Results 1 to 5 of 5

Thread: why is not it so

Threaded View

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    why is not it so

    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:
    Code:
    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
    Attached Images Attached Images  
    Baaaaaaaaah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width