Jump to content
  • Advertisement
Sign in to follow this  
Metal Typhoon

Changing window style during runtime ?

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

the topic says is all.. well.. i have this statemant... if (Msg.wParam == VK_F1) SetWindowLong (mHwnd,GWL_style,WS_POPUP); for some reason i dont get this to work.. it doesnt change from WS_OVERLAPPEDWINDOW to WS_POPUP .. if i change the statemant SetWindowLong (mHwnd,GWL_style,WS_POPUP); to anything wrong that i might be doing ?? thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
From MSDN:

Quote:
GWL_style: Sets a new window style.


However:
Quote:
The following styles can be specified wherever a window style is required. After the control has been created, these styles cannot be modified, except as noted.


So I am not sure if you can change the style at runtime, but you should take a look at the SetWindowLongPtr function instead. On that page it says:
Quote:
Certain window data is cached, so changes you make using SetWindowLongPtr will not take effect until you call the SetWindowPos function.
So try that with what you have now as well as this:
Quote:

Return Value

If the function succeeds, the return value is the previous value of the specified offset.

If the function fails, the return value is zero. To get extended error information, call GetLastError.


Check the return value to try and narrow down the problem.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Here's some code to help:

http://www.randommonkeyworks.com/newsite/programming/computer/DWinLib/DW_WinDockChild.shtml

Search for the 'togglePopupstyle' function.

(Here's the parent to that page:)
http://www.randommonkeyworks.com/newsite/programming/computer/DWinLib/DockingWindows.shtml

David

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.

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!