Click here to Skip to main content
15,881,852 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Capturing stdout from an external program Pin
David Crow26-Jan-11 3:55
David Crow26-Jan-11 3:55 
GeneralRe: Capturing stdout from an external program Pin
piul26-Jan-11 4:43
piul26-Jan-11 4:43 
GeneralRe: Capturing stdout from an external program Pin
David Crow26-Jan-11 5:40
David Crow26-Jan-11 5:40 
QuestionHow to get a CBitmap from a LPDIRECTDRAWSURFACE7 [Solved] Pin
kagelind26-Jan-11 3:01
kagelind26-Jan-11 3:01 
AnswerRe: How to get a CBitmap from a LPDIRECTDRAWSURFACE7 Pin
Code-o-mat26-Jan-11 7:54
Code-o-mat26-Jan-11 7:54 
GeneralRe: How to get a CBitmap from a LPDIRECTDRAWSURFACE7 Pin
kagelind26-Jan-11 23:35
kagelind26-Jan-11 23:35 
GeneralRe: How to get a CBitmap from a LPDIRECTDRAWSURFACE7 Pin
Code-o-mat26-Jan-11 23:41
Code-o-mat26-Jan-11 23:41 
GeneralRe: How to get a CBitmap from a LPDIRECTDRAWSURFACE7 Pin
Code-o-mat26-Jan-11 23:44
Code-o-mat26-Jan-11 23:44 
also, instead of this:
kagelind wrote:
CBitmap *cBmp;
cBmp->CreateCompatibleBitmap(pCDC,SurfaceDesc.dwWidth, SurfaceDesc.dwHeight);

do this:
CBitmap cBmp;
cBmp.CreateCompatibleBitmap(&surfaceCDC, SurfaceDesc.dwWidth, SurfaceDesc.dwHeight);

and use &cBmp everywhere you need its address.

Also, when you select the bitmap into the dcMemory, store its old CBitmap and select it back into the memory DC before destroying it or you might end up leaking handles. So something like:
CBitmap *originalBmp = dcMemory.SelectObject(&cBmp);
...do what you need...
dcMEmory.SelectObject(originalBmp);
dcMemory.DeleteDC();

> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<

GeneralRe: How to get a CBitmap from a LPDIRECTDRAWSURFACE7 Pin
kagelind27-Jan-11 2:28
kagelind27-Jan-11 2:28 
GeneralRe: How to get a CBitmap from a LPDIRECTDRAWSURFACE7 Pin
Code-o-mat27-Jan-11 2:36
Code-o-mat27-Jan-11 2:36 
GeneralRe: How to get a CBitmap from a LPDIRECTDRAWSURFACE7 Pin
kagelind27-Jan-11 4:08
kagelind27-Jan-11 4:08 
GeneralRe: How to get a CBitmap from a LPDIRECTDRAWSURFACE7 Pin
Code-o-mat27-Jan-11 4:11
Code-o-mat27-Jan-11 4:11 
QuestionIs there simple open source compiler code? Pin
yu-jian26-Jan-11 0:03
yu-jian26-Jan-11 0:03 
AnswerRe: Is there simple open source compiler code? Pin
CPallini26-Jan-11 0:13
mveCPallini26-Jan-11 0:13 
AnswerRe: Is there simple open source compiler code? Pin
Niklas L26-Jan-11 23:30
Niklas L26-Jan-11 23:30 
QuestionString Conversion Pin
Mike Certini25-Jan-11 16:11
Mike Certini25-Jan-11 16:11 
AnswerRe: String Conversion Pin
Mike Certini25-Jan-11 17:28
Mike Certini25-Jan-11 17:28 
GeneralRe: String Conversion Pin
Andrew Brock25-Jan-11 21:56
Andrew Brock25-Jan-11 21:56 
AnswerRe: String Conversion Pin
Stefan_Lang27-Jan-11 3:28
Stefan_Lang27-Jan-11 3:28 
QuestionConvert String Pin
DraC_fri25-Jan-11 12:47
DraC_fri25-Jan-11 12:47 
AnswerRe: Convert String Pin
Yusuf25-Jan-11 13:22
Yusuf25-Jan-11 13:22 
AnswerRe: Convert String Pin
Luc Pattyn25-Jan-11 13:23
sitebuilderLuc Pattyn25-Jan-11 13:23 
AnswerRe: Convert String Pin
Maximilien25-Jan-11 13:44
Maximilien25-Jan-11 13:44 
Questionboost::named_mutex not released after process abort Pin
WernerP25-Jan-11 4:06
WernerP25-Jan-11 4:06 
AnswerRe: boost::named_mutex not released after process abort Pin
T210225-Jan-11 19:41
T210225-Jan-11 19:41 

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.