Click here to Skip to main content
15,905,913 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Doubt - C Pin
_808613-Jun-09 21:47
_808613-Jun-09 21:47 
AnswerRe: Doubt - C Pin
killabyte14-Jun-09 1:28
killabyte14-Jun-09 1:28 
AnswerRe: Doubt - C Pin
Stuart Dootson14-Jun-09 2:19
professionalStuart Dootson14-Jun-09 2:19 
GeneralRe: Doubt - C Pin
musiclover9118-Jun-09 23:19
musiclover9118-Jun-09 23:19 
Questiontypedef struct constructor Pin
akira3213-Jun-09 6:50
akira3213-Jun-09 6:50 
AnswerRe: typedef struct constructor Pin
Ozer Karaagac13-Jun-09 7:20
professionalOzer Karaagac13-Jun-09 7:20 
QuestionHelp - Capture window to bitmap Pin
softwaremonkey13-Jun-09 5:25
softwaremonkey13-Jun-09 5:25 
AnswerRe: Help - Capture window to bitmap Pin
Randor 13-Jun-09 7:38
professional Randor 13-Jun-09 7:38 
Hi,

You can call CWnd::PrintClient[^] and ask the window to draw itself into the destination device context.

CBitmap bmpCap;
CBitmap *pBmpOld = NULL;
CWnd* pWnd = GetDlgItem(IDC_SUCN_CHART);
pWnd->GetWindowRect(&rect);
ScreenToClient(rect);
CDC* pdcScreen = pWnd->GetDC();
CDC memDC;
memDC.CreateCompatibleDC(pdcScreen);
bmpCap.CreateCompatibleBitmap(pdcScreen, rect.Width(), rect.Height());
pBmpOld = memDC.SelectObject(&bmpCap); 
pWnd->PrintClient(&memDC,PRF_NONCLIENT|PRF_CHILDREN);
/*
	Do something with it.
*/
memDC.SelectObject(pBmpOld);
pWnd->ReleaseDC(pdcScreen);
bmpCap.DeleteObject();
memDC.DeleteDC();

GeneralRe: Help - Capture window to bitmap Pin
softwaremonkey13-Jun-09 21:24
softwaremonkey13-Jun-09 21:24 
QuestionCompare Images. Pin
FISH78613-Jun-09 5:18
FISH78613-Jun-09 5:18 
AnswerRe: Compare Images. Pin
Randor 13-Jun-09 6:12
professional Randor 13-Jun-09 6:12 
AnswerRe: Compare Images. Pin
PJ Arends13-Jun-09 6:29
professionalPJ Arends13-Jun-09 6:29 
QuestionCreating a MFC "Static" Dill Pin
Larry Mills Sr13-Jun-09 4:35
Larry Mills Sr13-Jun-09 4:35 
AnswerRe: Creating a MFC "Static" Dill Pin
Randor 13-Jun-09 5:50
professional Randor 13-Jun-09 5:50 
GeneralRe: Creating a MFC "Static" Dill Pin
Larry Mills Sr13-Jun-09 16:08
Larry Mills Sr13-Jun-09 16:08 
GeneralRe: Creating a MFC "Static" Dill Pin
Randor 13-Jun-09 18:24
professional Randor 13-Jun-09 18:24 
Question[newbie] error C2065: 'b' : undeclared identifier Pin
jon-8013-Jun-09 3:23
professionaljon-8013-Jun-09 3:23 
AnswerRe: [newbie] error C2065: 'b' : undeclared identifier Pin
CPallini13-Jun-09 4:09
mveCPallini13-Jun-09 4:09 
AnswerRe: [newbie] error C2065: 'b' : undeclared identifier Pin
Stuart Dootson13-Jun-09 13:05
professionalStuart Dootson13-Jun-09 13:05 
GeneralRe: [newbie] error C2065: 'b' : undeclared identifier Pin
jon-8013-Jun-09 21:19
professionaljon-8013-Jun-09 21:19 
GeneralRe: [newbie] error C2065: 'b' : undeclared identifier Pin
Stuart Dootson14-Jun-09 2:16
professionalStuart Dootson14-Jun-09 2:16 
Question__declspec(dllimport) Pin
_808613-Jun-09 1:50
_808613-Jun-09 1:50 
AnswerRe: __declspec(dllimport) Pin
Randor 13-Jun-09 5:27
professional Randor 13-Jun-09 5:27 
GeneralRe: __declspec(dllimport) Pin
_808613-Jun-09 21:47
_808613-Jun-09 21:47 
GeneralRe: __declspec(dllimport) Pin
_808614-Jun-09 4:46
_808614-Jun-09 4:46 

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.