Click here to Skip to main content
15,920,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Winsock Problems Pin
valikac22-Apr-03 14:29
valikac22-Apr-03 14:29 
GeneralRe: Winsock Problems Pin
basementman24-Apr-03 8:10
basementman24-Apr-03 8:10 
GeneralXP Style dialogs Pin
conetti22-Apr-03 10:39
conetti22-Apr-03 10:39 
GeneralRe: XP Style dialogs Pin
Neville Franks22-Apr-03 11:40
Neville Franks22-Apr-03 11:40 
GeneralDouble Click Pin
Anthony988722-Apr-03 10:16
Anthony988722-Apr-03 10:16 
GeneralRe: Double Click Pin
David Crow22-Apr-03 10:22
David Crow22-Apr-03 10:22 
GeneralCreateCompatibleBitmap Pin
georgiek5022-Apr-03 10:13
georgiek5022-Apr-03 10:13 
GeneralRe: CreateCompatibleBitmap Pin
Chris Losinger22-Apr-03 10:40
professionalChris Losinger22-Apr-03 10:40 
the problem is that hBitmap is empty when you return it. you haven't drawn into it, or BitBlt'd into it, so it's just a blank bitmap.

it looks like your code is correct for the display of the bitmap, now you need to essentially duplicate that but this time you're "displaying" into your temp DC, and onto hBitmap. in other words:

after you display to hdc (with the BitBlt), do another SelectObject to select hBitmap into hdcMem.

then, BitBlt from hdc to hdcMem. after this, hBitmap will have the result of the Blt.

then, de-select hBitmap from the DC (by using the return value from the first SelectObject call in a final (3rd) SelectObject(hdmMem)).

-c


GeneralRe: CreateCompatibleBitmap Pin
georgiek5022-Apr-03 14:35
georgiek5022-Apr-03 14:35 
Generalvc++ 6 enviroment question Pin
tasoss22-Apr-03 9:55
tasoss22-Apr-03 9:55 
Question.net and windows forms and why use them? Pin
ns22-Apr-03 8:35
ns22-Apr-03 8:35 
AnswerRe: .net and windows forms and why use them? Pin
Maximilien22-Apr-03 9:10
Maximilien22-Apr-03 9:10 
GeneralRe: .net and windows forms and why use them? Pin
ns22-Apr-03 9:15
ns22-Apr-03 9:15 
AnswerRe: .net and windows forms and why use them? Pin
Ravi Bhavnani22-Apr-03 12:46
professionalRavi Bhavnani22-Apr-03 12:46 
Generaleasy question about convertion Pin
Martin_Viet22-Apr-03 8:17
Martin_Viet22-Apr-03 8:17 
GeneralRe: easy question about convertion Pin
Emiliano22-Apr-03 12:15
Emiliano22-Apr-03 12:15 
GeneralRe: easy question about convertion Pin
anju22-Apr-03 17:38
anju22-Apr-03 17:38 
GeneralWrite array to file Pin
Dominik Reichl22-Apr-03 7:53
Dominik Reichl22-Apr-03 7:53 
GeneralRe: Write array to file Pin
David Crow22-Apr-03 8:00
David Crow22-Apr-03 8:00 
GeneralRe: Write array to file Pin
Ryan_Roberts22-Apr-03 8:07
Ryan_Roberts22-Apr-03 8:07 
GeneralRe: Write array to file Pin
Dominik Reichl22-Apr-03 8:14
Dominik Reichl22-Apr-03 8:14 
GeneralRe: Write array to file Pin
Dominik Reichl22-Apr-03 8:11
Dominik Reichl22-Apr-03 8:11 
GeneralBasic Question. Pin
73Zeppelin22-Apr-03 7:48
73Zeppelin22-Apr-03 7:48 
GeneralRe: Basic Question. Pin
David Crow22-Apr-03 7:54
David Crow22-Apr-03 7:54 
GeneralRe: Basic Question. Pin
Le centriste22-Apr-03 10:47
Le centriste22-Apr-03 10:47 

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.