Task bar does not pop up
-
I have a Windows application programmed in C (SDK level) using VC6. My Windows 98 and Windows XP (on different PCs) are set up with task bar "Always on top" & "Auto-hide". With my application window having the focus and maximised, the task bar pops correctly in Win98 when I bring the mouse pointer to the bottom of the monitor, but on XP, the task bar does not popup. I register the window as:
memset(&wc,0,sizeof(wc)); wc.style = CS_BYTEALIGNWINDOW | CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS; wc.lpfnWndProc = MainWindowProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hAppInst; wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hCursor = LoadCursor (NULL, IDC_ARROW); wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wc.lpszMenuName = NULL; wc.lpszClassName = szAppName; RegisterClass (&wc);
and I create the window as:hwndPrimary = CreateWindow(szAppName, // window class name szPrimaryTitleBar, WS_POPUP | WS_BORDER, // No title bar, thin border, not resizeable! CW_USEDEFAULT, // initial x position CW_USEDEFAULT, // initial y position CW_USEDEFAULT, // initial x size CW_USEDEFAULT, // initial y size NULL, // parent window handle NULL, // window menu handle hAppInst, // program instance handle NULL); // creation parameters
and then do:ShowWindow(hwndPrimary,sw); ShowWindow(hwndPrimary, SW_MAXIMIZE);
Note - I use window style WS_POPUP | WS_BORDER because I need maximum size client area. I can't waste space on title bar, thick border, etc. If I do not maximise the window, the task bar pops up just fine, but the moment the application is maximised (which I need to do), the task bar does not pop up properly. The problem only occurs under Windows XP. When I run the EXE under Win98, the task bar pops up as expected. Any suggestions?