opengl and tabbed window
-
Hi All! I'm a opengl-newbie and I want to add a simple example to complete my application. Today my application is splitted into 2 tab: - first tab contains game's settings - second tab should contain the game! The problem is that I'm not able to create the game using that tab :'( I found a lot of example that create a simple opengl application using a window, but no example uses a single Windows::Forms::TabPage^ (I'm usign visual studio) I hope it can be done, because the first tab required me a lot of time.. ps:for the second tab,just to begin,a simple black "screen" can be enough :)
-
Hi All! I'm a opengl-newbie and I want to add a simple example to complete my application. Today my application is splitted into 2 tab: - first tab contains game's settings - second tab should contain the game! The problem is that I'm not able to create the game using that tab :'( I found a lot of example that create a simple opengl application using a window, but no example uses a single Windows::Forms::TabPage^ (I'm usign visual studio) I hope it can be done, because the first tab required me a lot of time.. ps:for the second tab,just to begin,a simple black "screen" can be enough :)
It can be done. I know, because i've done it with the Win32 SysTabControl32 on which (i'm fairly certain) Windows.Forms.TabPage is based. Make sure the window you're hosting in the tab is set up correctly (clip siblings, OWNDC, etc) and that you're handling all painting messages (don't let the framework try to draw / double-buffer for you). On a side note: this is a bit of a crappy UI choice. I'm not sure what sort of settings you're putting on the first page, but if you ever plan on allowing users to modify things they might want to see reflected in the game, the nature of tabs will prevent them from seeing their changes on-the-fly.
Citizen 20.1.01
'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
-
It can be done. I know, because i've done it with the Win32 SysTabControl32 on which (i'm fairly certain) Windows.Forms.TabPage is based. Make sure the window you're hosting in the tab is set up correctly (clip siblings, OWNDC, etc) and that you're handling all painting messages (don't let the framework try to draw / double-buffer for you). On a side note: this is a bit of a crappy UI choice. I'm not sure what sort of settings you're putting on the first page, but if you ever plan on allowing users to modify things they might want to see reflected in the game, the nature of tabs will prevent them from seeing their changes on-the-fly.
Citizen 20.1.01
'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
you can implement such things so users can modify things on-the-fly (i.e. realtime), and from any event that you may wish to be the trigger, i.e. changes in a control (e.g. tab page) reflected in the 'game' realtime, and visa versa. oh, and here is an link to a brief example of how it could be done (seems OP Athos1984 already has it, so placing it here may be a good reference for others too): http://www.gamedev.net/community/forums/topic.asp?topic\_id=499979
modified on Tuesday, July 8, 2008 7:26 PM