Jump to content
  • Advertisement
Sign in to follow this  
Spidey

Direct3D(DXUT) Disable Resize Window

This topic is 3226 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

Hi, I created a game using DXUT but I'm having a problem disabling the resizing of the window, I commented out the code for the WM_SIZE in dxut.cpp but it still performs a stretch blit every time I resize the window. I know I can resize the viewport/buffers but I dont want to do that and instead want a fixed screen size throughout the game. Does anyone know how to diable resize/maximize in direct3d/dxut ? Thank you!

Share this post


Link to post
Share on other sites
Advertisement
You need to change the window style to WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME. It's the thickframe style that allows resizing.

I've never done it, but you may be able to do it using DXUTSetCallbackMsgProc. You'd have to code a message processing function, trap WM_CREATE and change the style parameter of the CREATESTRUCT.

EDIT: by the way, WM_SIZE is the window notification that the window has already been resized.

[Edited by - Buckeye on August 18, 2009 5:49:47 PM]

Share this post


Link to post
Share on other sites
Thank You So Much! it worked like a charm! Do you know of a flag to disable Maximizing the window as well ?

EDIT: nevermind, fixed the maximize! thank you

Share this post


Link to post
Share on other sites
Hmm. Maybe WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX?

EDIT: When you solve a problem, you should post the solution for others to find later. [WINK]

Share this post


Link to post
Share on other sites
Ahh, I'll do that next time. Yep, that's exactly what I used

WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME & ~WS_MAXIMIZEBOX

:D

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!