Click here to Skip to main content
15,922,007 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: problem with CString Pin
zizzzz19-Sep-06 3:58
zizzzz19-Sep-06 3:58 
AnswerRe: problem with CString Pin
Naveen19-Sep-06 3:51
Naveen19-Sep-06 3:51 
GeneralRe: problem with CString Pin
Zac Howland19-Sep-06 3:57
Zac Howland19-Sep-06 3:57 
GeneralRe: problem with CString Pin
Naveen19-Sep-06 3:59
Naveen19-Sep-06 3:59 
AnswerRe: problem with CString Pin
Zac Howland19-Sep-06 3:56
Zac Howland19-Sep-06 3:56 
AnswerRe: problem with CString Pin
Jun Du19-Sep-06 4:01
Jun Du19-Sep-06 4:01 
GeneralRe: problem with CString Pin
Cedric Moonen19-Sep-06 4:05
Cedric Moonen19-Sep-06 4:05 
GeneralRe: problem with CString Pin
Zac Howland19-Sep-06 4:09
Zac Howland19-Sep-06 4:09 
GeneralRe: problem with CString Pin
Jun Du19-Sep-06 4:36
Jun Du19-Sep-06 4:36 
GeneralRe: problem with CString Pin
zizzzz19-Sep-06 4:48
zizzzz19-Sep-06 4:48 
GeneralRe: problem with CString Pin
Jun Du19-Sep-06 4:52
Jun Du19-Sep-06 4:52 
GeneralRe: problem with CString Pin
Zac Howland19-Sep-06 4:57
Zac Howland19-Sep-06 4:57 
GeneralRe: problem with CString Pin
David Crow19-Sep-06 7:17
David Crow19-Sep-06 7:17 
GeneralRe: problem with CString Pin
Zac Howland19-Sep-06 8:17
Zac Howland19-Sep-06 8:17 
GeneralRe: problem with CString Pin
PJ Arends19-Sep-06 9:06
professionalPJ Arends19-Sep-06 9:06 
AnswerRe: problem with CString Pin
David Crow19-Sep-06 4:56
David Crow19-Sep-06 4:56 
AnswerRe: problem with CString Pin
Trollslayer19-Sep-06 5:57
mentorTrollslayer19-Sep-06 5:57 
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

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.