Window Position

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.
 
P

pem3v78

This doesn't work ?

CRect myRect;
GetClientRect(&myRect);

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

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top