I want to write a function that sets the graphics mode and returns the hwnd of the screen, so that I can perform OpenGL operations on it. How can I do this?
Thanks.
Getting the hwnd of an OpenScreen(), or other method.
edit i realised that whai i just typed is obsolete.... nm me... sorry
to get the hwnd of the desktop window HWND GetDesktopWindow(VOID)
in pb thats : GetDesktopWindow_()
The GetDesktopWindow function returns the handle of the Windows desktop window. The desktop window covers the entire screen. The desktop window is the area on top of which all icons and other windows are painted.
to set a screen res. this might help http://delphi.about.com/library/weekly/aa011100a.htm
to get the hwnd of the desktop window HWND GetDesktopWindow(VOID)
in pb thats : GetDesktopWindow_()
The GetDesktopWindow function returns the handle of the Windows desktop window. The desktop window covers the entire screen. The desktop window is the area on top of which all icons and other windows are painted.
to set a screen res. this might help http://delphi.about.com/library/weekly/aa011100a.htm
I get the message that setuppixelformat failed when I try this code:
I don't expect you to understand my 3D engine, but this should demonstrate what I am trying to do.
Code: Select all
hwnd=GetDesktopWindow()
cam=CreateCamera(hwnd,0)
CreateCube(0)
MoveEntity cam,0,0,-10
While Not KeyHit(1)
RenderCamera cam
FlipCamera cam
Wend