Minimize application from taskbar
-
I have a dialog box with the Title Bar setting set to False. This means that the Minimize Bar setting is False as well. This is why I can't minimize the application when I click on the icon task bar, but I would like this to happen.Any suggestions?:confused::confused::confused: Thank you!
-
I have a dialog box with the Title Bar setting set to False. This means that the Minimize Bar setting is False as well. This is why I can't minimize the application when I click on the icon task bar, but I would like this to happen.Any suggestions?:confused::confused::confused: Thank you!
Junyor wrote:
This is why I can't minimize the application when I click on the icon task bar, but I would like this to happen.Any suggestions?
You can send a
WM_SYSCOMMAND
message withwParam
parameter set toSC_MINIMIZE
. :~
Nibu thomas A Developer Programming tips[^] My site[^]
-
Junyor wrote:
This is why I can't minimize the application when I click on the icon task bar, but I would like this to happen.Any suggestions?
You can send a
WM_SYSCOMMAND
message withwParam
parameter set toSC_MINIMIZE
. :~
Nibu thomas A Developer Programming tips[^] My site[^]
i hope this code might be helpful to u. bool bClientWinState = false;//define and declare this variable in OninitDialog(); of your application. handle the OnNotifyIcon event like this: LRESULT CMyApplication::OnNotifyIcon(WPARAM wParam, LPARAM lParam) { UINT uID; UINT uMouseMsg; uID = (UINT) wParam; uMouseMsg = (UINT) lParam; if ((uMouseMsg == WM_LBUTTONDOWN) || (uMouseMsg == WM_LBUTTONDBLCLK)) { if(bClientWinState) { AfxGetApp()->m_pMainWnd->ShowWindow(SW_RESTORE); AfxGetApp()->m_pMainWnd->SetForegroundWindow(); bClientWinState = false; } else { AfxGetApp()->m_pMainWnd->ShowWindow(SW_MINIMIZE); this->ShowWindow(SW_HIDE); bClientWinState = true; } } ] jiteen tilekar Siemens Info. systems Ltd., Pune
-
i hope this code might be helpful to u. bool bClientWinState = false;//define and declare this variable in OninitDialog(); of your application. handle the OnNotifyIcon event like this: LRESULT CMyApplication::OnNotifyIcon(WPARAM wParam, LPARAM lParam) { UINT uID; UINT uMouseMsg; uID = (UINT) wParam; uMouseMsg = (UINT) lParam; if ((uMouseMsg == WM_LBUTTONDOWN) || (uMouseMsg == WM_LBUTTONDBLCLK)) { if(bClientWinState) { AfxGetApp()->m_pMainWnd->ShowWindow(SW_RESTORE); AfxGetApp()->m_pMainWnd->SetForegroundWindow(); bClientWinState = false; } else { AfxGetApp()->m_pMainWnd->ShowWindow(SW_MINIMIZE); this->ShowWindow(SW_HIDE); bClientWinState = true; } } ] jiteen tilekar Siemens Info. systems Ltd., Pune