Sign in to follow this  
Spidey

Direct3D(DXUT) Disable Resize Window

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this