Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Call a extern variable from Application class Pin
Jokcy13-Mar-11 1:34
Jokcy13-Mar-11 1:34 
AnswerRe: Call a extern variable from Application class Pin
Richard MacCutchan12-Mar-11 22:44
mveRichard MacCutchan12-Mar-11 22:44 
GeneralRe: Call a extern variable from Application class Pin
Jokcy12-Mar-11 23:01
Jokcy12-Mar-11 23:01 
GeneralRe: Call a extern variable from Application class Pin
Richard MacCutchan13-Mar-11 2:03
mveRichard MacCutchan13-Mar-11 2:03 
GeneralRe: Call a extern variable from Application class Pin
Jokcy13-Mar-11 3:14
Jokcy13-Mar-11 3:14 
GeneralRe: Call a extern variable from Application class Pin
Richard MacCutchan13-Mar-11 4:23
mveRichard MacCutchan13-Mar-11 4:23 
GeneralRe: Call a extern variable from Application class Pin
Jokcy14-Mar-11 21:40
Jokcy14-Mar-11 21:40 
QuestionLoad Bitmap with CreateCompatibleBitmap Pin
leorex12-Mar-11 16:23
leorex12-Mar-11 16:23 
I was browsing through the web and trying to find the method of double buffering to load an bmp image. I get all the example, except I can't seems to find anyway to actually draw the bmp file into the memhdc. to be precise I will get an example code here.
hdc_mem = CreateCompatibleDC(hDC);

bmp_mem = CreateCompatibleBitmap(hDC, 80, 25);

hdc_mem = LoadBitmap(hInst, MAKEINTRESOURCE(ID_for_BMP)); // problematic line

SelectObject(hdc_mem, bmp_mem);

BitBlt(hDC, 100, 50, 180, 75, hdc_mem, 0, 0, SRCCOPY);

DeleteDC (hDC);

DeleteDC (hdc_mem);

DeleteObject (bmp_button);


In the part where I should write stuff into hdc_mem, and I did LoadBitmapbut nothing is drawn on the screen. If i take the LoadBitmap line away, it will draw me a black box.
what should I do? any links for any example?
AnswerRe: Load Bitmap with CreateCompatibleBitmap Pin
bob1697212-Mar-11 18:07
bob1697212-Mar-11 18:07 
GeneralRe: Load Bitmap with CreateCompatibleBitmap Pin
leorex12-Mar-11 18:11
leorex12-Mar-11 18:11 
GeneralRe: Load Bitmap with CreateCompatibleBitmap Pin
bob1697212-Mar-11 19:55
bob1697212-Mar-11 19:55 
AnswerRe: Load Bitmap with CreateCompatibleBitmap Pin
Richard MacCutchan12-Mar-11 22:49
mveRichard MacCutchan12-Mar-11 22:49 
AnswerRe: Load Bitmap with CreateCompatibleBitmap Pin
Hans Dietrich13-Mar-11 0:15
mentorHans Dietrich13-Mar-11 0:15 
QuestionGdplus::Color to DWORD Pin
csrss12-Mar-11 8:56
csrss12-Mar-11 8:56 
AnswerRe: Gdplus::Color to DWORD Pin
bob1697212-Mar-11 9:37
bob1697212-Mar-11 9:37 
AnswerRe: Gdplus::Color to DWORD Pin
Luc Pattyn12-Mar-11 10:05
sitebuilderLuc Pattyn12-Mar-11 10:05 
GeneralRe: Gdplus::Color to DWORD Pin
bob1697212-Mar-11 11:06
bob1697212-Mar-11 11:06 
GeneralRe: Gdplus::Color to DWORD Pin
csrss12-Mar-11 19:46
csrss12-Mar-11 19:46 
QuestionDebug Error While Running Program on Other Computer Pin
AmbiguousName12-Mar-11 7:20
AmbiguousName12-Mar-11 7:20 
AnswerRe: Debug Error While Running Program on Other Computer Pin
Code-o-mat12-Mar-11 8:53
Code-o-mat12-Mar-11 8:53 
QuestionUSB devices list [modified] Pin
fasked12-Mar-11 3:12
fasked12-Mar-11 3:12 
AnswerRe: USB devices list Pin
Hans Dietrich12-Mar-11 4:53
mentorHans Dietrich12-Mar-11 4:53 
GeneralRe: USB devices list Pin
fasked12-Mar-11 5:23
fasked12-Mar-11 5:23 
AnswerRe: USB devices list Pin
Luc Pattyn12-Mar-11 6:05
sitebuilderLuc Pattyn12-Mar-11 6:05 
QuestionHow to create a process with a different, really restricted user account? Pin
Member 774798412-Mar-11 1:56
Member 774798412-Mar-11 1:56 

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.