Jump to content

  • Log In with Google      Sign In   
  • Create Account


Small problem


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Coffee Drinker   Members   -  Reputation: 122

Like
Likes
Like

Posted 28 July 2001 - 07:00 PM

hi there i''m writing my first 3d game and i feel quite excited about it. my tiny problem is that i can''t get rid of the taskbar after i switch the display mode (if the new resolution is same or higher then the current). does anyone know how to deal with this? also, i''ve always been wondering how to enumerate or check for all available OpenGL drivers on the system and if needed, switch to them. since this is my largest project so far and i''m new to opengl, i''m approaching it very carefully, considering all the details and stuff, so i''ll accept any kind of advice. do you think a nice 3d terrain, viewed from a bird''s eye could run smoothly on, say, a p3/500 with a voodoo3. the terrain will be viewed from a flying object, from high above, so i guess BSP trees and portals won''t speed things a lot. my best bet so far is view frustum culling. am i right about this? thanks Free your mind.

Sponsor:

#2 Terran Marine   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 July 2001 - 12:49 AM

I''m not sure about the taskbar...

You might want to apply fogging in order to decrease the viewing distance and gain performance.



#3 Coffee Drinker   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 July 2001 - 01:31 AM

yeah, and it looks so nice!


#4 merlin9x9   Members   -  Reputation: 174

Like
Likes
Like

Posted 30 July 2001 - 07:30 AM

The problem is that the taskbar is usually set to be a top-most window, which means that you must make your window top-most if you want it to overlap the taskbar. You''ll probably want to do this whenever your window is activated (you can handle it in either WM_ACTIVATE or WM_ACTIVATEAPP) to make sure that the window always gets put in front of the taskbar.

Good luck with your game!

#5 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

Posted 30 July 2001 - 10:32 AM

create the window with WS_EX_TOPMOST ( im not to sure if thats the corrct command but its very similar to it)

#6 Coffee Drinker   Members   -  Reputation: 122

Like
Likes
Like

Posted 30 July 2001 - 11:20 AM

alright!
thanks a lot


#7 merlin9x9   Members   -  Reputation: 174

Like
Likes
Like

Posted 30 July 2001 - 11:41 AM

That works, but only once. You have to make your window top-most every time it gains the focus, which is why I recommended doing it where you handle WM_ACTIVATE or WM_ACTIVATEAPP.

Think about it this way. The taskbar is (usually) a top-most window. Then you make your app a top-most window. How does Windows decide which one gets to be on top since they''re both top-most? It doesn''t—the only guarantee you have with a top-most window is that it will always be on top of non-top-most windows. So, in other words, whichever top-most window had the input focus last is the one that''s on top.

So, you just created your window, and since it gains the input focus, it''ll be on top. But let''s say the user Alt+Tab''s out of your app or otherwise switches. Or maybe another app steals the input focus. The taskbar will gain the input focus and become the one on top. Then you go back to your app, and the taskbar will still be on top.

So, again, you must make your window top-most every time your window is activated, and you do this by using, say, SetWindowPos with the value HWND_TOPMOST passed for the hWndInsertAfter parameter. As a nice side-effect, once you''ve done this, you won''t have to bother to create the window with the WS_EX_TOPMOST style since the window receives activation messages when it''s first created (though it doesn''t hurt to add the style anyway).




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS