Jump to content
  • Advertisement

Archived

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

snisarenko

Window programming questions

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

I have a few questions about programming a window. How would I implement (or modify Nehe''s code) to : 1. Make a non-resizable window. When cursor comes to the edge it does not turn into a resizing arrow. 2. Window only has a close button at the top right corner. 3. How to make the mouse coursor dissappear in windowed mode and give all of the mouse control to my window ?

Share this post


Link to post
Share on other sites
Advertisement
in CreateWindowEx, there is something like WS_OVERLAPPEDWINDOW...change it to WS_OVERLAPPED | WS_SYSMENU

then use this at the beginning: ShowCursor(false) and at the end ShowCursor(true)

if you have any questions ask
Brian

Share this post


Link to post
Share on other sites
So if I do what u said in the window function then WINDOWS shouldn't send me the resize message, right ???????

If I do ShowCursor(true) in the middle of my program after i called ShowCursor(false) in the begining, will it show up ?

Also, if I do ShowCursor(true), will it show up in fullsreen?

[edited by - snisarenko on December 24, 2002 10:42:08 PM]

[edited by - snisarenko on December 24, 2002 10:42:58 PM]

Share this post


Link to post
Share on other sites
Well if you cant resize then no...it wont send a resize message...um...ShowCursor has a counter ie if you call it with false twice, you will have to call it with two trues to make it come back up. Show cursor works for fullscreen and windowed mode.

brian

Share this post


Link to post
Share on other sites
Thank u for the replies I will try that [:=)]

I tried it. It Worked. THANK YOU..THANK YOU..THANK YOU..

[edited by - snisarenko on December 24, 2002 11:07:19 PM]

Share this post


Link to post
Share on other sites
Since i am bothering you anyways (sorry for being so inquisitive)
Help me out with one more thing

In windowed mode i did ShowCursor(FALSE). But it Still shows up when it goes outside the window. So how would i make it dissappear totally? Like in Unreal Tournament or Queake 3 when u play in windowed mode the cursor totaly dissapears.

Share this post


Link to post
Share on other sites
Im not sure but it might have something to do with DirectInput exclusive mode...i could be way off. Another thing you could do is intercept mouse move messages and move the cursor back inside the window...which is more of a hack but if you want continuous movement thats probably all you are looking for anyway.

Brian

Share this post


Link to post
Share on other sites

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