Click here to Skip to main content
15,914,217 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: How to replace a CDC of another CWnd Pin
Hamid_RT1-Aug-07 22:56
Hamid_RT1-Aug-07 22:56 
AnswerRe: How to replace a CDC of another CWnd Pin
FlyingBear1-Aug-07 23:17
FlyingBear1-Aug-07 23:17 
AnswerRe: How to replace a CDC of another CWnd Pin
FlyingBear1-Aug-07 23:22
FlyingBear1-Aug-07 23:22 
AnswerRe: How to replace a CDC of another CWnd Pin
Iain Clarke, Warrior Programmer1-Aug-07 23:52
Iain Clarke, Warrior Programmer1-Aug-07 23:52 
GeneralRe: How to replace a CDC of another CWnd Pin
FlyingBear2-Aug-07 0:41
FlyingBear2-Aug-07 0:41 
GeneralRe: How to replace a CDC of another CWnd Pin
Iain Clarke, Warrior Programmer2-Aug-07 1:16
Iain Clarke, Warrior Programmer2-Aug-07 1:16 
GeneralRe: How to replace a CDC of another CWnd Pin
FlyingBear2-Aug-07 2:30
FlyingBear2-Aug-07 2:30 
GeneralRe: How to replace a CDC of another CWnd Pin
Hamid_RT2-Aug-07 2:47
Hamid_RT2-Aug-07 2:47 
Im not sure its your answer or no but if its not your answer reply to me
HDC m_hdcMem,hdc;
HBITMAP m_Bitmap,m_OldBitmap,hMainBmp ;

hdc=GetDesktopWindow()->GetDC()->m_hDC;//GetDC()->m_hDC 
    m_hdcMem= CreateCompatibleDC(hdc);
	
	m_Bitmap = CreateCompatibleBitmap(hdc,800,600);
 m_OldBitmap=(HBITMAP) SelectObject(m_hdcMem, m_Bitmap);

   BitBlt(m_hdcMem, 0,0,800,600, hdc,0,0,SRCCOPY);
    hMainBmp =(HBITMAP) SelectObject(m_hdcMem, m_OldBitmap);

/////Save this snapshot to a file;)/////
CImage m_Image;
m_Image.Attach(hMainBmp);
m_Image.Save("c:\\test.bmp");
m_Image.Detach();
DeleteDC(m_hdcMem);
DeleteObject(hMainBmp );
DeleteObject(m_OldBitmap);





WhiteSky

GeneralRe: How to replace a CDC of another CWnd Pin
FlyingBear2-Aug-07 3:57
FlyingBear2-Aug-07 3:57 
GeneralRe: How to replace a CDC of another CWnd Pin
Hamid_RT2-Aug-07 5:09
Hamid_RT2-Aug-07 5:09 
AnswerRe: How to replace a CDC of another CWnd Pin
Iain Clarke, Warrior Programmer1-Aug-07 23:23
Iain Clarke, Warrior Programmer1-Aug-07 23:23 
GeneralRe: How to replace a CDC of another CWnd Pin
FlyingBear2-Aug-07 0:25
FlyingBear2-Aug-07 0:25 
QuestionRe: How to replace a CDC of another CWnd Pin
Mark Salsbery2-Aug-07 9:27
Mark Salsbery2-Aug-07 9:27 
AnswerRe: How to replace a CDC of another CWnd Pin
Michael Dunn2-Aug-07 8:18
sitebuilderMichael Dunn2-Aug-07 8:18 
GeneralRe: How to replace a CDC of another CWnd Pin
FlyingBear2-Aug-07 8:53
FlyingBear2-Aug-07 8:53 
AnswerRe: How to replace a CDC of another CWnd Pin
FlyingBear2-Aug-07 19:21
FlyingBear2-Aug-07 19:21 
QuestionEnable C++ Exceptions Pin
Tal S.1-Aug-07 22:37
Tal S.1-Aug-07 22:37 
AnswerRe: Enable C++ Exceptions Pin
Russell'2-Aug-07 2:35
Russell'2-Aug-07 2:35 
QuestionRunning 10 threads at a time Pin
neha.agarwal271-Aug-07 22:22
neha.agarwal271-Aug-07 22:22 
AnswerRe: Running 10 threads at a time Pin
Iain Clarke, Warrior Programmer1-Aug-07 22:48
Iain Clarke, Warrior Programmer1-Aug-07 22:48 
AnswerRe: Running 10 threads at a time Pin
Iain Clarke, Warrior Programmer1-Aug-07 22:52
Iain Clarke, Warrior Programmer1-Aug-07 22:52 
AnswerRe: Running 10 threads at a time Pin
Russell'1-Aug-07 22:57
Russell'1-Aug-07 22:57 
GeneralRe: Running 10 threads at a time Pin
neha.agarwal272-Aug-07 2:09
neha.agarwal272-Aug-07 2:09 
GeneralRe: Running 10 threads at a time Pin
Russell'2-Aug-07 2:27
Russell'2-Aug-07 2:27 
GeneralRe: Running 10 threads at a time Pin
Mark Salsbery2-Aug-07 8:31
Mark Salsbery2-Aug-07 8:31 

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.