-
February 14th, 2010, 08:30 AM
#1
Saving and Restoring Windows Position with win32 api
Hi guys, do you have any code in win32 api (c++) which can save and restore windows positions. I tried to googling on how to save and restore windows pos tutorial but I can't find the one which is in win32 api. Most of the tutorial is in mfc. Is there any source code in c++ using win32 api which can save/restore windows pos? Thanx.
-
February 14th, 2010, 09:54 AM
#2
Re: Saving and Restoring Windows Position with win32 api
There is no API call to do this. You'll have to get your window position at exit, save it somewhere (probably registry) then retrieve this value when a new window is created.
-
February 14th, 2010, 10:30 AM
#3
Re: Saving and Restoring Windows Position with win32 api
Hi hoxsiew, do u know how can I store my windows position using registry? Do u hv any example code on how to do that? Thanx.
-
February 14th, 2010, 10:45 AM
#4
Re: Saving and Restoring Windows Position with win32 api
No, not specifically.
If you use a framework like MFC, it is done for you; the framework creates an entry in the software section for your application and it is easily accessed by the CWinApp members. Otherwise, you'll have to create the entry yourself. See:
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
for a list of the registry API functions.
You can use GetWindowPlacement/SetWindowPlacement:
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
to save/restore window position information.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|