I'm making a custom caption bar with custom draw buttons by removing the window default bar with SetWindowLong(hWndParent, GWL_STYLE, 0). Everything is going good by now except I'm stuck at making my window minimize by clicking the taskbar programmatically. I'm trying the WM_ACTIVATEAPP right now but the window are unable to minimize properly.
This is the code for WM_ACTIVATEAPP for main window:
case WM_ACTIVATEAPP:
if(LOWORD(wParam) == FALSE)
SendMessage(hWndParent,WM_SYSCOMMAND,SC_MINIMIZE,NULL);
break;
When you left click the task bar,it will minimize BUT once you released the click.. the window will be restored.. Is there something missing? I want to make it minimize after you release the click.
Notes: I dint put the activate window code because the window seems to be able to restore itself by clicking the taskbar after being minimized with custom draw button.