Click here to Skip to main content
15,917,997 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeRe: extern "C" Pin
Rajesh R Subramanian5-Feb-08 23:34
professionalRajesh R Subramanian5-Feb-08 23:34 
GeneralRe: extern "C" Pin
CPallini5-Feb-08 23:36
mveCPallini5-Feb-08 23:36 
GeneralRe: extern "C" Pin
Rajesh R Subramanian5-Feb-08 23:45
professionalRajesh R Subramanian5-Feb-08 23:45 
GeneralRe: extern "C" Pin
CPallini5-Feb-08 23:55
mveCPallini5-Feb-08 23:55 
GeneralRe: extern "C" Pin
Rajesh R Subramanian5-Feb-08 23:57
professionalRajesh R Subramanian5-Feb-08 23:57 
GeneralRe: extern "C" Pin
George_George6-Feb-08 18:20
George_George6-Feb-08 18:20 
GeneralRe: extern "C" Pin
CPallini6-Feb-08 20:50
mveCPallini6-Feb-08 20:50 
GeneralRe: extern "C" Pin
George_George7-Feb-08 3:29
George_George7-Feb-08 3:29 
GeneralRe: extern "C" Pin
CPallini7-Feb-08 3:53
mveCPallini7-Feb-08 3:53 
GeneralRe: extern "C" Pin
George_George7-Feb-08 4:08
George_George7-Feb-08 4:08 
GeneralHttp download resume support Pin
Sudhir Mangla5-Feb-08 18:47
professionalSudhir Mangla5-Feb-08 18:47 
GeneralRe: Http download resume support Pin
Hamid_RT5-Feb-08 19:42
Hamid_RT5-Feb-08 19:42 
GeneralRe: Http download resume support Pin
Sudhir Mangla5-Feb-08 19:46
professionalSudhir Mangla5-Feb-08 19:46 
GeneralRe: Http download resume support Pin
David Crow6-Feb-08 2:40
David Crow6-Feb-08 2:40 
GeneralQuery on system() API on VC 6.0 Pin
Member 38696825-Feb-08 18:33
Member 38696825-Feb-08 18:33 
GeneralRe: Query on system() API on VC 6.0 Pin
hxhl955-Feb-08 18:37
hxhl955-Feb-08 18:37 
QuestionRe: Query on system() API on VC 6.0 Pin
David Crow6-Feb-08 2:42
David Crow6-Feb-08 2:42 
GeneralRe: Query on system() API on VC 6.0 Pin
Member 38696826-Feb-08 2:55
Member 38696826-Feb-08 2:55 
QuestionRecomended books Pin
Gregory Bryant5-Feb-08 18:14
Gregory Bryant5-Feb-08 18:14 
GeneralRe: Recomended books Pin
User 5838525-Feb-08 18:41
User 5838525-Feb-08 18:41 
GeneralRe: Recomended books Pin
Hamid_RT5-Feb-08 19:38
Hamid_RT5-Feb-08 19:38 
Questiondevice context problem Pin
trioum5-Feb-08 17:56
trioum5-Feb-08 17:56 
QuestionRe: device context problem Pin
Hamid_RT5-Feb-08 19:40
Hamid_RT5-Feb-08 19:40 
GeneralRe: device context problem Pin
Iain Clarke, Warrior Programmer5-Feb-08 21:58
Iain Clarke, Warrior Programmer5-Feb-08 21:58 
Are you asking...

"I have an HDC that some other part of my program (eg a library) is drawing on.
With just that HDC information, can I save the picture?"

?

I can see a few barriers to saying Yes.

1/ I can't find any function called GetHDCSize (or equivalent), so you would have to select in a new BITMAP, and examine the old BITMAP for information, then select it back. But you have to do this in the same thread as the Thing that is drawing to the HDC.

2/ HDC's are normally temporary objects, given to a program from a central pool. How you got this HDC is important. If you simply stored a HDC returned from BeginPaint, then the HDC will be recycled by EndPaint, and it will no longer be valid. If you get GetDC (hWnd) yourself, then you will be working on a different HDC to the Thing you talked about earlier.

3/ I'm now running out of ideas, as any more answers depend on details you haven't told us (yet).

Good luck,

Iain.

Iain Clarke appearing by Special Request of CPallini.

GeneralRe: device context problem Pin
Rajkumar R5-Feb-08 22:16
Rajkumar R5-Feb-08 22:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.