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

C / C++ / MFC

 
AnswerRe: CString trouble Pin
Don Box1-Aug-07 23:21
Don Box1-Aug-07 23:21 
AnswerRe: CString trouble Pin
Michael Dunn2-Aug-07 8:18
sitebuilderMichael Dunn2-Aug-07 8:18 
QuestionHow to replace a CDC of another CWnd Pin
FlyingBear1-Aug-07 22:50
FlyingBear1-Aug-07 22:50 
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 
Really thanks, I tried this, the rect is right, but the contents is from the corresponding top level windows, do i need to bring the window to top, and then use this method, but if so, the orders of the windows will be totally ruined.

<br />
CDC dc;<br />
CDC* pDC = pWnd->GetDC();<br />
CRect rc;<br />
pWnd->GetWindowRect(rc);<br />
dc.CreateCompatibleDC(pDC);<br />
CBitmap bmp;<br />
bmp.CreateCompatibleBitmap(pDC, rc.Width(), rc.Height());<br />
HBITMAP bmpOld;<br />
bmpOld = (HBITMAP)dc.SelectObject(bmp);<br />
dc.BitBlt(0, 0, rc.Width(), rc.Height(), pDC, 0, 0, SRCCOPY);<br />
CxImage imgSnapshot;<br />
imgSnapshot.CreateFromHBITMAP(bmp);<br />

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 
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 

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.