-
October 24th, 2007, 09:50 AM
#1
restoring the last state of app like in ShowWindow()
When my application exits, I want to see if its final state is maximized or minimized or etc so I can restore it to that state when it is restarted again. I don't see any function which can tell me that (sort of the opposition function of ShowWindow())
In MFC it is easy to set the application to maximized:
Code:
m_nCmdShow = SW_MAXIMIZE;
but I would rather like to set it to the last state. Any hints? Thanks.
-
October 24th, 2007, 10:03 AM
#2
Re: restoring the last state of app like in ShowWindow()
what you want to do is handle the WM_SIZE messages specifically wehre the type is (MAXIMIZE,MINIMIZE,RESTORE) and track what state your program is yourself.
When you exit you store it to the registry, when you come up you load it from the registry.
-
October 24th, 2007, 10:18 AM
#3
Re: restoring the last state of app like in ShowWindow()
Originally Posted by JMS
what you want to do is handle the WM_SIZE messages specifically wehre the type is (MAXIMIZE,MINIMIZE,RESTORE) and track what state your program is yourself.
When you exit you store it to the registry, when you come up you load it from the registry.
Can the state be not captured elsewhere other than WM_SIZE?
-
October 24th, 2007, 10:43 AM
#4
Re: restoring the last state of app like in ShowWindow()
Take a look at this thread
Victor Nijegorodov
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
|