Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Progress Bar vc++ Pin
Nibu babu thomas19-May-06 0:08
Nibu babu thomas19-May-06 0:08 
AnswerRe: Progress Bar vc++ Pin
David Crow19-May-06 3:23
David Crow19-May-06 3:23 
QuestionWhy does my BitBlt not work? Pin
Wim Engberts18-May-06 23:00
Wim Engberts18-May-06 23:00 
AnswerRe: Why does my BitBlt not work? Pin
Sarath C18-May-06 23:07
Sarath C18-May-06 23:07 
AnswerRe: Why does my BitBlt not work? Pin
Naveen18-May-06 23:07
Naveen18-May-06 23:07 
AnswerRe: Why does my BitBlt not work? Pin
Laxman Auti18-May-06 23:08
Laxman Auti18-May-06 23:08 
GeneralRe: Why does my BitBlt not work? Pin
Wim Engberts18-May-06 23:17
Wim Engberts18-May-06 23:17 
GeneralRe: Why does my BitBlt not work? Pin
masnu19-May-06 5:26
masnu19-May-06 5:26 
William,

You cannot draw to Memory device context until you select a bitmap into it. The code should look something like this:

<br />
	//Create memory device context<br />
	CDC* mDC = new CDC();<br />
	mDC->CreateCompatibleDC(m_pDC);<br />
	<br />
	//Create compatible bitmap<br />
	CBitmap* mBM = new CBitmap();<br />
	mBM->CreateCompatibleBitmap(pDC, int nWidth, int nHeight) <br />
<br />
<br />
	//Select bitmap into mDC<br />
	mDC->SelectObject(mBM);<br />


From here you can use all GDI calls on mDC. Hope this helps.
Questioncopy constructor Pin
Scorpio18-May-06 22:17
Scorpio18-May-06 22:17 
AnswerRe: copy constructor Pin
Cedric Moonen18-May-06 22:19
Cedric Moonen18-May-06 22:19 
GeneralRe: copy constructor Pin
Maxwell Chen18-May-06 22:22
Maxwell Chen18-May-06 22:22 
GeneralRe: copy constructor Pin
Cedric Moonen18-May-06 22:25
Cedric Moonen18-May-06 22:25 
GeneralRe: copy constructor Pin
Maxwell Chen18-May-06 22:31
Maxwell Chen18-May-06 22:31 
GeneralRe: copy constructor Pin
ThatsAlok19-May-06 2:01
ThatsAlok19-May-06 2:01 
GeneralRe: copy constructor Pin
Roger Stoltz18-May-06 22:49
Roger Stoltz18-May-06 22:49 
AnswerRe: copy constructor Pin
knoxplusplus23-May-06 7:38
knoxplusplus23-May-06 7:38 
QuestionTimers in VC++ Pin
nripun18-May-06 22:02
nripun18-May-06 22:02 
AnswerRe: Timers in VC++ Pin
Eytukan18-May-06 22:03
Eytukan18-May-06 22:03 
AnswerRe: Timers in VC++ Pin
shilianghui218-May-06 22:11
shilianghui218-May-06 22:11 
GeneralRe: Timers in VC++ Pin
Trollslayer18-May-06 22:32
mentorTrollslayer18-May-06 22:32 
GeneralRe: Timers in VC++ Pin
Dennis Gourjii18-May-06 23:44
Dennis Gourjii18-May-06 23:44 
JokeRe: Timers in VC++ Pin
Nibu babu thomas19-May-06 0:14
Nibu babu thomas19-May-06 0:14 
GeneralRe: Timers in VC++ Pin
ThatsAlok19-May-06 1:56
ThatsAlok19-May-06 1:56 
AnswerRe: Timers in VC++ Pin
Nibu babu thomas18-May-06 22:11
Nibu babu thomas18-May-06 22:11 
AnswerRe: Timers in VC++ Pin
ThatsAlok19-May-06 1:58
ThatsAlok19-May-06 1:58 

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.