Taskbar Button don't have the correct status
-
Hi My program suppose to be sometimes hidden. when the user wants to show it, its button in the taskbar does not have the correct status. that means that if the program was first maximized (before hiding it) it is being shown maximized too but the minimize button (on the window corner) does not work and right click on its taskbar button shows only the maximize button. Here is the code when hiding the window:
//saving the window placement ::GetWindowPlacement(hWnd,&sWndPlt); ::ShowWindow(hWnd,SW_HIDE);
And here is the code when Showing the window:::SetWindowPlacement(hWnd,&sWndPlt); ::ShowWindow(hWnd,SW_SHOW); ::UpdateWindow(hWnd); ::SetForegroundWindow(hWnd); ::SetActiveWindow(hWnd);
Is there a way to solve this problem? Thanks a lot mamtz -
Hi My program suppose to be sometimes hidden. when the user wants to show it, its button in the taskbar does not have the correct status. that means that if the program was first maximized (before hiding it) it is being shown maximized too but the minimize button (on the window corner) does not work and right click on its taskbar button shows only the maximize button. Here is the code when hiding the window:
//saving the window placement ::GetWindowPlacement(hWnd,&sWndPlt); ::ShowWindow(hWnd,SW_HIDE);
And here is the code when Showing the window:::SetWindowPlacement(hWnd,&sWndPlt); ::ShowWindow(hWnd,SW_SHOW); ::UpdateWindow(hWnd); ::SetForegroundWindow(hWnd); ::SetActiveWindow(hWnd);
Is there a way to solve this problem? Thanks a lot mamtz -
:zzz: I forgot to mention that actually i have 2 programes. The first is always hidden and the second suppose to be sometimes hidden and sometimes not. The first one register the hot keys and is the one which hidding the second one. The first program has no maximize/minimize/system menu. The second program has these buttons and they are enabled. Does it make things different? :wtf: