Results 1 to 6 of 6

Thread: WM_SIZE doesn't work as intended

Threaded View

  1. #1

    Thread Starter
    Registered User Olly's Avatar
    Join Date
    Apr 2001
    Location
    Switzerland
    Posts
    252

    Unhappy WM_SIZE doesn't work as intended

    Hello! I hope that you can halp me with my particular problem.
    I need to hide the mousecurser when the window is getting maximized and to display it again when the window gets restored.

    Now i do the following:

    Code:
    			if (wParam == SIZE_MAXIMIZED)  //check whether the user has maximized the window
    				
    				{
    				 memset(&devModeScreen, 0, sizeof(devModeScreen));
    				 devModeScreen.dmSize		=			sizeof(devModeScreen);
    				 devModeScreen.dmPelsWidth	=			screenWidth;
    				 devModeScreen.dmPelsHeight	=			screenHeight;
    				 devModeScreen.dmBitsPerPel	=			screenBpp;
    				 devModeScreen.dmFields		=			DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL;
    				
    				dwExStyle = WS_EX_APPWINDOW;	//hide all topper level windows
    				dwStyle = WS_POPUP;					//remove the window borders
    				ShowCursor(FALSE);						//hide the cursor
    				fullScreen = true;			
    				}
    				
    			else
    
    				{
    						dwExStyle=NULL;
    						dwStyle = WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_SYSMENU | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
    						ShowCursor(TRUE);		//show the cursor
    						fullScreen = false;
    				}
    But this code doesn't hide the cursor at all! It first hides it and then shows it up again even though i put it into the else chunk.
    I've already tried to use SIZE_RESTORED instead of the else and this has the same effect. Hence i think it's always calling for the SIZE_RESTORED. But why is it doing that? I'm not restoring it at all!

    (I can't imagine this is not due to a wrong if/else formulation , I simply don't get it why it does that
    Last edited by Olly; Aug 22nd, 2001 at 10:59 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width