Click here to Skip to main content
15,896,484 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using VC++ using MFC

There are 4 related functions to get the coordinates of form, dialog, control...

1. GetWindowRect(rect);
2. ScreenToClient(rect);
3. GetClientRect(rect);
4. ClientToScreen(rect);

Each of 1,2,3,4 have 4 coordinates like as rect.left, rect.top, rect.right, rect.bottom

I want to restore listctrl window (or any windows) when user click the sw_restore button.

Questions:
1. First I save the 4 coordinates of one of above 4 cases.
2. When in the event of OnSize() that is type = SIZE_RESTORED
MoveWindow(a,b,c,d);

What is a = ?, b =?, c=?, d=?

Thank you.

What I have tried:

More than 10 days wasted for this problems.
Posted
Updated 2-Jun-16 0:22am

I already responded to this question at How do I restore window position and size?[^]. Please do not repost.
 
Share this answer
 
Start (as always) with the documentation: CWnd::MoveWindow[^] - it explains the function parameters...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900