Restore after HIDE?
-
ShowWindow(SW_HIDE) will hide the window and in my case , make the windows of other applications to the foreground and activate them. How can I restore it programatically when my application is not having focus.. Does my application have to be a service..in which case any short cut key will make it active again? row
-
ShowWindow(SW_HIDE) will hide the window and in my case , make the windows of other applications to the foreground and activate them. How can I restore it programatically when my application is not having focus.. Does my application have to be a service..in which case any short cut key will make it active again? row
ROWALI wrote:
How can I restore it programatically when my application is not having focus
You need a handle or a pointer on your window, and then use ShowWindow(SW_SHOW). BUT the question is : what is the reason for your window to be showed again ? According to the answer, you'll find the method to bring the window back (e.g. do it from another app -- a hook, or from within your app). ~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
-
ShowWindow(SW_HIDE) will hide the window and in my case , make the windows of other applications to the foreground and activate them. How can I restore it programatically when my application is not having focus.. Does my application have to be a service..in which case any short cut key will make it active again? row
Just an idea... You could always use RegisterHotKey() and set a hotkey activation. Then in your dialog, you would need to handle the WM_HOTKEY message, and do ShowWindow(SW_SHOW) and make your dialog visible again. or You could add a system tray icon, and have the user click the tray icon to show the dialog again. I would suggest searching codeproject, there are many samples of both. -Randor
-
ShowWindow(SW_HIDE) will hide the window and in my case , make the windows of other applications to the foreground and activate them. How can I restore it programatically when my application is not having focus.. Does my application have to be a service..in which case any short cut key will make it active again? row
After you
ShowWindow(SW_NORMAL)
UseSetWindowPos
withHWND_NOTOPMOST
for the "insert after" parameter. byebye..
--[:jig:]-- [My Current Status]
-
ShowWindow(SW_HIDE) will hide the window and in my case , make the windows of other applications to the foreground and activate them. How can I restore it programatically when my application is not having focus.. Does my application have to be a service..in which case any short cut key will make it active again? row
Try CWnd::OnSetFocus and CWnd::OnActivateApp SaRath.
"Do Next Thing..." Understanding State Pattern in C++