Windows control to DirectX texture?
by Benedict Walmisley · in General Discussion · 10/19/2001 (8:17 am) · 5 replies
Does anyone know if its possible to direct the output of a GDI/Windows control (or a plugin) onto a DirectX surface or texture?
I need to add a front end onto my game and it needs to be 'in game' with no nasty resolution switches. Flash would be ideal for this but there doesnt seem to be a reliable method for getting the output of a windows control onto a bitmap.
Any ideas?
I know there is a technique in "Win32:GDI and Direct Draw" by Feng Yuan but that only works on Windows 2000 and XP.
Benedict
I need to add a front end onto my game and it needs to be 'in game' with no nasty resolution switches. Flash would be ideal for this but there doesnt seem to be a reliable method for getting the output of a windows control onto a bitmap.
Any ideas?
I know there is a technique in "Win32:GDI and Direct Draw" by Feng Yuan but that only works on Windows 2000 and XP.
Benedict
#2
What DX version are you using?
if you are using DX8/DX8.1, and your program is in fullscreen mode. you will not be able to use GDI control. since DX8 exclusive mode has disabled all GDI functions.
If you are using DX7 or older, use ddraw->FlipToGDISurface() before you trying display the GDI controls.this should work on windows95/98/me
In most cases, anything involve GDI call, it will be slow. Most people settle on making their own 2D controls in fullscreen mode.
if your program is in window mode, i see no reason why can't you use GDI controls, in any worse case, just open another window and put all your GDI controls there
10/19/2001 (9:07 am)
hmm.. i am not quite get the question. you want to out put a windows into a surface? or do you mean you want to output a ddraw surface into a window (ie, windowed mode)??What DX version are you using?
if you are using DX8/DX8.1, and your program is in fullscreen mode. you will not be able to use GDI control. since DX8 exclusive mode has disabled all GDI functions.
If you are using DX7 or older, use ddraw->FlipToGDISurface() before you trying display the GDI controls.this should work on windows95/98/me
In most cases, anything involve GDI call, it will be slow. Most people settle on making their own 2D controls in fullscreen mode.
if your program is in window mode, i see no reason why can't you use GDI controls, in any worse case, just open another window and put all your GDI controls there
#3
Any kind of switching resolutions/refresh is not acceptable (this is what Jumpgate does for its main page - not good).
Benedict
10/19/2001 (9:29 am)
The main problem I have is that I'm looking for some sort of shortcut for defining the main interface [ IE select level, single player, options etc]. Some method of running a Flash animation from within a DX8 program would be ideal.Any kind of switching resolutions/refresh is not acceptable (this is what Jumpgate does for its main page - not good).
Benedict
#4
why not just make your own 2D UI, you can animate them in whatever way you want, present them in whatever resolution you like. afterall, this is how everyone doing it.
no sure about flash. i doubt you will be able to use it on a ddraw surface/idirect3Dsurface8.
10/19/2001 (10:28 am)
hmm....why not just make your own 2D UI, you can animate them in whatever way you want, present them in whatever resolution you like. afterall, this is how everyone doing it.
no sure about flash. i doubt you will be able to use it on a ddraw surface/idirect3Dsurface8.
#5
Its a pity because I know Flash has been used for this on several PS2 games.
Benedict
10/19/2001 (10:34 am)
Yeah, I was trying to avoid building my own 2d GUI.Its a pity because I know Flash has been used for this on several PS2 games.
Benedict
Torque Owner Doug Binks
After all, the DirectX window is just a window, even when i's full screen. So you can always put another window on top.
Hope this helps, as I don't know of an easy way to actually draw the windows controls into a DX window.
Doug. EnkiSofware Limited