Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

outRider

Window resizing, changing styles

This topic is 6106 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Just a little irritating quirk here. I have a window that can be either fullscreen (popup window with screen res set to match window dimentions) or a regular window. When switching between the two I hide the window, change the screen res to either the windows dimentions, or the user''s default, set the window''s styles to be either popup or regular, then show it again. Works fine, but I don''t want the window to be resizeable by the user, so the maximize button and the border dragging functions are disabled. When I switch to a regular windowed mode I get the sound that corresponds to the default beep. It seems to happen the next time through my loop after the change, where the message is dispatched to WndProc. Are there messeges that are sent to WndProc that I''m ignoring or something?? Here''s my WndProc:
  
switch (uMsg)
	{
	case WM_CLOSE:
		{
			PostQuitMessage(0);
			break;
		}
	case WM_ACTIVATE:
		{
			if (LOWORD(wParam) == WA_INACTIVE)
				MainWin.m_bWindowActive = false;
			else
				MainWin.m_bWindowActive = true;
			break;
		}
	/*case WM_SIZE:
		{
			MainWin.m_iScreenWidth = LOWORD(lParam);
			MainWin.m_iScreenHeight = HIWORD(lParam);
			ResizeViewport(MainWin.m_iScreenWidth, MainWin.m_iScreenHeight, MainWin.m_fFOV, MainWin.m_fNearClipPlane, MainWin.m_fFarClipPlane);
			break;
		}*/
	case WM_ERASEBKGND:
		break;
	default:
		return DefWindowProc(hWnd, uMsg, wParam, lParam);
	}

	return 0;
  
If anyone has any insight I''d appreciate it. ------------ - outRider -

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!