Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Win32API/MFC to capture desktop as an image Pin
«_Superman_»29-Jul-09 20:20
professional«_Superman_»29-Jul-09 20:20 
GeneralRe: Win32API/MFC to capture desktop as an image Pin
Adam Roderick J29-Jul-09 20:23
Adam Roderick J29-Jul-09 20:23 
GeneralRe: Win32API/MFC to capture desktop as an image Pin
Madhu_Rani29-Jul-09 21:43
Madhu_Rani29-Jul-09 21:43 
GeneralRe: Win32API/MFC to capture desktop as an image Pin
Madhu_Rani29-Jul-09 23:17
Madhu_Rani29-Jul-09 23:17 
GeneralRe: Win32API/MFC to capture desktop as an image Pin
Adam Roderick J29-Jul-09 23:35
Adam Roderick J29-Jul-09 23:35 
GeneralRe: Win32API/MFC to capture desktop as an image Pin
Madhu_Rani29-Jul-09 23:41
Madhu_Rani29-Jul-09 23:41 
GeneralRe: Win32API/MFC to capture desktop as an image Pin
Adam Roderick J30-Jul-09 0:00
Adam Roderick J30-Jul-09 0:00 
GeneralRe: Win32API/MFC to capture desktop as an image Pin
Madhu_Rani30-Jul-09 0:05
Madhu_Rani30-Jul-09 0:05 
void CSDITESTView::OnFileTest()
{
int nScreenWidth = GetSystemMetrics(SM_CXSCREEN);
int nScreenHeight = GetSystemMetrics(SM_CYSCREEN);

HWND hDesktopWnd = GetDesktopWindow()->m_hWnd;

HDC hDesktopDC = ::GetDC(hDesktopWnd);
HDC hCaptureDC = CreateCompatibleDC(hDesktopDC);
HBITMAP hCaptureBitmap =CreateCompatibleBitmap(hDesktopDC,nScreenWidth, nScreenHeight);
SelectObject(hCaptureDC,hCaptureBitmap);
BitBlt(hCaptureDC,0,0,nScreenWidth,nScreenHeight, hDesktopDC,0,0,SRCCOPY|CAPTUREBLT);
::ReleaseDC(hDesktopWnd,hDesktopDC);
DeleteDC(hCaptureDC);

}

I guess this code should work as it is doing the all stuff already, but it not displaying anything ? why
AnswerRe: Win32API/MFC to capture desktop as an image [modified] Pin
Adam Roderick J30-Jul-09 0:31
Adam Roderick J30-Jul-09 0:31 
GeneralRe: Win32API/MFC to capture desktop as an image Pin
Madhu_Rani30-Jul-09 1:59
Madhu_Rani30-Jul-09 1:59 
GeneralRe: Win32API/MFC to capture desktop as an image Pin
Madhu_Rani30-Jul-09 2:05
Madhu_Rani30-Jul-09 2:05 
GeneralRe: Win32API/MFC to capture desktop as an image Pin
Asharudeed16-Feb-10 4:23
Asharudeed16-Feb-10 4:23 
QuestionemBDA.sys BSOD!!! [modified] Pin
Kiran Satish29-Jul-09 19:00
Kiran Satish29-Jul-09 19:00 
QuestionCRect Pin
kumar sanghvi29-Jul-09 18:45
kumar sanghvi29-Jul-09 18:45 
Questionhow to convert the matlab left matrix division \ into cv++ with opencv? Pin
DevelopmentNoob29-Jul-09 16:23
DevelopmentNoob29-Jul-09 16:23 
Question"Assertion Failed" with thread and device context Pin
nautilusvn29-Jul-09 16:11
nautilusvn29-Jul-09 16:11 
AnswerRe: "Assertion Failed" with thread and device context Pin
Richard Andrew x6429-Jul-09 16:51
professionalRichard Andrew x6429-Jul-09 16:51 
GeneralRe: "Assertion Failed" with thread and device context Pin
nautilusvn29-Jul-09 17:25
nautilusvn29-Jul-09 17:25 
GeneralRe: "Assertion Failed" with thread and device context Pin
Richard Andrew x6429-Jul-09 17:31
professionalRichard Andrew x6429-Jul-09 17:31 
GeneralRe: "Assertion Failed" with thread and device context Pin
Richard Andrew x6429-Jul-09 17:35
professionalRichard Andrew x6429-Jul-09 17:35 
GeneralRe: "Assertion Failed" with thread and device context Pin
nautilusvn29-Jul-09 20:27
nautilusvn29-Jul-09 20:27 
GeneralRe: "Assertion Failed" with thread and device context Pin
Richard Andrew x6430-Jul-09 4:14
professionalRichard Andrew x6430-Jul-09 4:14 
AnswerRe: "Assertion Failed" with thread and device context Pin
krmed30-Jul-09 6:53
krmed30-Jul-09 6:53 
QuestionPassing multi-dimensional array from C# to Win32 C++ dll? [modified] [MOVED TO C++/CLI] Pin
devvvy29-Jul-09 16:03
devvvy29-Jul-09 16:03 
AnswerRe: Passing multi-dimensional array from C# to Win32 C++ dll? Pin
Richard Andrew x6429-Jul-09 16:48
professionalRichard Andrew x6429-Jul-09 16:48 

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.