Jump to content
  • Advertisement
Sign in to follow this  
vladic2000x

Problem with windows xp style window

This topic is 3747 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 there. I develop a full-screen DirectX9 based application. I use Windows XP and I usually work in classic style (windows and buttons), but recently I have switched back to XP style (Display properties->Appearance) and I noticed a strange bug in my application. Here it is: I run my application in 800x600 full-screen mode. When I move the mouse in region [0,0,4,4] (left,top,right,bottom) and click there, suddenly the event is transmitted to both my application window and to the rest of the system (for example the folder window which was opened before or the desktop) and the system switches the focus to the previous window and minimizes my DX9 application. The same happens with the rectangle [798,0,799,4]. This problem does not occur with classic style of windows in Windows XP. I think that this could be related to some parameters passed to CreateWindow() function. I have tried to change some, but that didn't help. I also tested the same thing in a couple of samples which come with DirectX SDK, and this problem was not found there. Can somebody give me a hint where to search for the bug in my application?

Share this post


Link to post
Share on other sites
Advertisement
A fullscreen window should have the WS_POPUP style, and a non-fullscreen window should have WS_OVERLAPPEDWINDOW probably, and you'll want to use AdjustWindowRectEx to make sure you get the correct window size (CreateWindowEx takes the dimensions of the window rect, not the client rect).

if you're not doing those two things, give them a go and see if that fixes it.

Share this post


Link to post
Share on other sites
Evil Steve was right. My application window was created with WS_OVERLAPPEDWINDOW flag which is fine for windowed mode, but when you move to full-screen you have to change the style to WS_POPUP.

Thanks!

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!