Window Position

  • Thread starter Thread starter insomniac
  • Start date Start date
I

insomniac

Does anyone have a code snippet that retrieves a windows
coordinates within the desktop? I can't seem to get
GetWindowPlacement() to work. And GetWindowRect returns
0,0 for the top,left corner, not the current position on
the screen.

Thanks.
 
This doesn't work ?

CRect myRect;
GetClientRect(&myRect);

ClientToScreen(myRect);
MoveWindow(myRect.left, myRect.top, myRect.Width() + 20, myRect.Height() +
20);

Mike
 
Back
Top