Window programming questions

Started by
15 comments, last by snisarenko 21 years, 3 months ago
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 ?
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
Brian J
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]
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
Brian J
1)&2)in mfc use CMiniFrameWnd


[edited by - j stoll on December 24, 2002 10:49:11 PM]
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]
No problem

Brian
Brian J
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.
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
Brian J
How do i intercept and move the cursor ?
Are there standart Functions ?

This topic is closed to new replies.

Advertisement