Click here to Skip to main content
15,889,335 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSTL conflict Pin
eddyroth31-Jan-06 4:26
eddyroth31-Jan-06 4:26 
QuestionWhat is the difference between HANDLE and HWND ? Pin
wicked weasel31-Jan-06 4:20
wicked weasel31-Jan-06 4:20 
QuestionExplaination needed.. Pin
wicked weasel31-Jan-06 4:18
wicked weasel31-Jan-06 4:18 
QuestionWhat is the difference between HANDLE and HWND ? Pin
unknown**person31-Jan-06 4:10
unknown**person31-Jan-06 4:10 
AnswerRe: What is the difference between HANDLE and HWND ? Pin
wicked weasel31-Jan-06 4:21
wicked weasel31-Jan-06 4:21 
AnswerRe: What is the difference between HANDLE and HWND ? Pin
Dethulus31-Jan-06 4:23
Dethulus31-Jan-06 4:23 
QuestionMemory DC Pin
masnu31-Jan-06 4:10
masnu31-Jan-06 4:10 
AnswerRe: Memory DC Pin
Dethulus31-Jan-06 8:21
Dethulus31-Jan-06 8:21 
You have to create a compatible bitmap for the in-memory DC and select it into the one you created. The default bitmap for a newly created device context is (I believe) just a 1x1 monochrome bitmap. The steps necessary are:

hMemDC = CreateCompatibleDC(hDC);
hMyBmp = CreateCompatibleBitmap(hDC, nWidth, nHeight);
hOldBmp = SelectObject(hMemDC, hMyBmp);
... draw some stuff on the in-memory DC ...
BitBlt(hDC, hMemDC, 0, 0, nWidth, nHeight, 0, 0, SRCCOPY);
SelectObject(hMemDC, hOldBmp);
DeleteObject(hOldBmp);
DeleteObject(hMemDC);

... however, I just typed this off the top of my head, so it's possible there's a bug in it. Poke tongue | ;-P

-Dethulus

GeneralRe: Memory DC Pin
Ryan Binns31-Jan-06 17:36
Ryan Binns31-Jan-06 17:36 
GeneralRe: Memory DC Pin
Dethulus1-Feb-06 1:18
Dethulus1-Feb-06 1:18 
GeneralRe: Memory DC Pin
Ryan Binns1-Feb-06 1:23
Ryan Binns1-Feb-06 1:23 
QuestionHow to know programmatically if network cable is connected or not? Pin
Amarelia31-Jan-06 2:22
Amarelia31-Jan-06 2:22 
AnswerRe: How to know programmatically if network cable is connected or not? Pin
David Crow31-Jan-06 3:27
David Crow31-Jan-06 3:27 
GeneralRe: How to know programmatically if network cable is connected or not? Pin
Amarelia1-Feb-06 8:05
Amarelia1-Feb-06 8:05 
AnswerRe: How to know programmatically if network cable is connected or not? Pin
M.Mehrdad.M31-Jan-06 4:05
M.Mehrdad.M31-Jan-06 4:05 
GeneralRe: How to know programmatically if network cable is connected or not? Pin
Amarelia1-Feb-06 8:07
Amarelia1-Feb-06 8:07 
AnswerRe: How to know programmatically if network cable is connected or not? Pin
bob1697231-Jan-06 8:43
bob1697231-Jan-06 8:43 
GeneralRe: How to know programmatically if network cable is connected or not? Pin
Amarelia1-Feb-06 8:09
Amarelia1-Feb-06 8:09 
JokeRe: How to know programmatically if network cable is connected or not? Pin
Balon Fan22-Jun-08 1:43
Balon Fan22-Jun-08 1:43 
QuestionChanging Views in SplitterWindow-Panes Pin
hever31-Jan-06 2:04
hever31-Jan-06 2:04 
QuestionRe: Changing Views in SplitterWindow-Panes Pin
David Crow31-Jan-06 3:34
David Crow31-Jan-06 3:34 
GeneralRe: Changing Views in SplitterWindow-Panes Pin
hever31-Jan-06 7:52
hever31-Jan-06 7:52 
QuestionRe: Changing Views in SplitterWindow-Panes Pin
hever31-Jan-06 8:46
hever31-Jan-06 8:46 
AnswerRe: Changing Views in SplitterWindow-Panes Pin
hever31-Jan-06 10:44
hever31-Jan-06 10:44 
Questionset dialog to no max or no change of size Pin
waxie31-Jan-06 1:36
waxie31-Jan-06 1:36 

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.