abdul
Aug 27th, 2001, 04:06 PM
Again, I want to take a screenshot of my desktop and then put that on my window but you can look at the attachment and it is all messed up
Here is the code I am using:
case WM_PAINT:
parenthwnd = GetParent(hwnd);
winhdc = BeginPaint(hwnd, &ps);
parenthdc = GetDC(parenthwnd);
//-----------------------
for(x=0;x<GetSystemMetrics(SM_CXSCREEN);x++)
{
for(y=0;y<GetSystemMetrics(SM_CYSCREEN);y++)
{
SetPixel(winhdc, x,y, GetPixel(parenthdc, x,y));
}
}
EndPaint(hwnd, &ps);
ReleaseDC(parenthwnd, parenthdc);
return 0;
It also takes about 3 to 5 seconds to paint the messed up desktop picture onto the window. What is wrong with that?
I could not post the whole picture because it was too big but I am getting the same thing on the whole window
Here is the code I am using:
case WM_PAINT:
parenthwnd = GetParent(hwnd);
winhdc = BeginPaint(hwnd, &ps);
parenthdc = GetDC(parenthwnd);
//-----------------------
for(x=0;x<GetSystemMetrics(SM_CXSCREEN);x++)
{
for(y=0;y<GetSystemMetrics(SM_CYSCREEN);y++)
{
SetPixel(winhdc, x,y, GetPixel(parenthdc, x,y));
}
}
EndPaint(hwnd, &ps);
ReleaseDC(parenthwnd, parenthdc);
return 0;
It also takes about 3 to 5 seconds to paint the messed up desktop picture onto the window. What is wrong with that?
I could not post the whole picture because it was too big but I am getting the same thing on the whole window