Click here to Skip to main content
15,897,122 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: problem with CString Pin
David Crow19-Sep-06 7:22
David Crow19-Sep-06 7:22 
Questionhow to get window content , when window is invisible Pin
astabasta19-Sep-06 3:19
astabasta19-Sep-06 3:19 
AnswerRe: how to get window content , when window is invisible Pin
Naveen19-Sep-06 3:26
Naveen19-Sep-06 3:26 
GeneralRe: how to get window content , when window is invisible Pin
astabasta19-Sep-06 4:08
astabasta19-Sep-06 4:08 
GeneralRe: how to get window content , when window is invisible Pin
Naveen19-Sep-06 4:20
Naveen19-Sep-06 4:20 
GeneralRe: how to get window content , when window is invisible Pin
astabasta19-Sep-06 5:07
astabasta19-Sep-06 5:07 
GeneralRe: how to get window content , when window is invisible Pin
astabasta19-Sep-06 10:41
astabasta19-Sep-06 10:41 
GeneralRe: how to get window content , when window is invisible Pin
Naveen19-Sep-06 17:04
Naveen19-Sep-06 17:04 
here is a non-mfc version of the code. this code will draw the image to the desktop.If u have any other windows in the desktop plz minimize them before testing this code.

::ShowWindow( m_hWnd, FALSE );<br />
HDC hdc = ::GetDC(m_hWnd);<br />
RECT WindRect;<br />
::GetWindowRect( m_hWnd, &WindRect );<br />
HDC MemDC = ::CreateCompatibleDC( hdc );<br />
HBITMAP bmp = CreateCompatibleBitmap( hdc, WindRect.right - WindRect.left, WindRect.bottom- WindRect.top );<br />
SelectObject( MemDC,bmp );<br />
SendMessage( WM_PRINT, (WPARAM)MemDC,PRF_CLIENT | PRF_NONCLIENT|PRF_ERASEBKGND);<br />
HDC DeskDc = ::GetDC(0);<br />
BitBlt( DeskDc,0,0,WindRect.right - WindRect.left, WindRect.bottom- WindRect.top , MemDC,0,0,SRCCOPY );



astabasta wrote:
but still the returned image is all black.


how do u verify the image in the dc? I mean how u came in to conclusion that the images is black?


nave

GeneralRe: how to get window content , when window is invisible Pin
astabasta20-Sep-06 2:18
astabasta20-Sep-06 2:18 
GeneralRe: how to get window content , when window is invisible Pin
Naveen20-Sep-06 2:21
Naveen20-Sep-06 2:21 
GeneralRe: how to get window content , when window is invisible Pin
Naveen31-Jan-07 0:45
Naveen31-Jan-07 0:45 
AnswerRe: how to get window content , when window is invisible Pin
Jun Du19-Sep-06 3:45
Jun Du19-Sep-06 3:45 
GeneralRe: how to get window content , when window is invisible Pin
astabasta19-Sep-06 4:11
astabasta19-Sep-06 4:11 
GeneralRe: how to get window content , when window is invisible Pin
Jun Du19-Sep-06 5:00
Jun Du19-Sep-06 5:00 
QuestionWriting Code for 64-bit windows Pin
vikas amin19-Sep-06 3:17
vikas amin19-Sep-06 3:17 
AnswerRe: Writing Code for 64-bit windows Pin
Dimitris Vikeloudas20-Sep-06 23:17
Dimitris Vikeloudas20-Sep-06 23:17 
QuestionInline editing: How explorer does it? Pin
Dimitris Vikeloudas19-Sep-06 3:02
Dimitris Vikeloudas19-Sep-06 3:02 
QuestionDrawing over a window - directdraw overlay? Pin
Andrew Altham19-Sep-06 2:50
Andrew Altham19-Sep-06 2:50 
Questionatlres.h missing Pin
neha.agarwal2719-Sep-06 2:24
neha.agarwal2719-Sep-06 2:24 
AnswerRe: atlres.h missing Pin
Hamid_RT19-Sep-06 2:42
Hamid_RT19-Sep-06 2:42 
QuestionRe: atlres.h missing Pin
David Crow19-Sep-06 2:46
David Crow19-Sep-06 2:46 
Questionadding my exe to the startup in the registry Pin
Kiran Pinjala19-Sep-06 2:22
Kiran Pinjala19-Sep-06 2:22 
QuestionRe: adding my exe to the startup in the registry Pin
David Crow19-Sep-06 2:56
David Crow19-Sep-06 2:56 
AnswerRe: adding my exe to the startup in the registry Pin
Kiran Pinjala19-Sep-06 3:00
Kiran Pinjala19-Sep-06 3:00 
GeneralRe: adding my exe to the startup in the registry Pin
Kiran Pinjala19-Sep-06 3:06
Kiran Pinjala19-Sep-06 3:06 

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.