Minimizing app with task bar button
-
Hi everybody, Encountered a strange problem. When started, my application reacts properly on task bar events - it can be minimized by clicking on its task bar icon, and restored when the button is clicked again. But after I load a file into the app, the program will not minimize by task bar button, though the caption color changes to inactive. If I click on the caption, or use system menu to minimize the program, or just open the system menu, the normal behavior of task bar button is restored. Setting breakpoint in syscommand handler, I see that when the taskbar button is working correctly the program gets SC_MINIMIZE/SC_MAXIMIZE. After loading a file, it does not. Any idea on possible reason? Thanks, Yuri
-
Hi everybody, Encountered a strange problem. When started, my application reacts properly on task bar events - it can be minimized by clicking on its task bar icon, and restored when the button is clicked again. But after I load a file into the app, the program will not minimize by task bar button, though the caption color changes to inactive. If I click on the caption, or use system menu to minimize the program, or just open the system menu, the normal behavior of task bar button is restored. Setting breakpoint in syscommand handler, I see that when the taskbar button is working correctly the program gets SC_MINIMIZE/SC_MAXIMIZE. After loading a file, it does not. Any idea on possible reason? Thanks, Yuri
If you are using MFC, make sure you are not dealing with taskbar icon in CMyDocument::OnNewDocument() or CMyDocument::OnCloseDocument() or CMyDocument::DeleteConetents(). Its better to handle taskbar add/remove operations in CWinApp derived class. Just some wild guesses ;) Hth, Ramu
-
If you are using MFC, make sure you are not dealing with taskbar icon in CMyDocument::OnNewDocument() or CMyDocument::OnCloseDocument() or CMyDocument::DeleteConetents(). Its better to handle taskbar add/remove operations in CWinApp derived class. Just some wild guesses ;) Hth, Ramu
Ramu Pulipati wrote: If you are using MFC, make sure you are not dealing with taskbar icon in CMyDocument::OnNewDocument() or CMyDocument::OnCloseDocument() or CMyDocument::DeleteConetents(). Its better to handle taskbar add/remove operations in CWinApp derived class. I do not actually handle any of taskbar events explicitly, nor I use tray icons. This is just regular taskbar button that does not work... Thanks, Yuri