Heh, indeed.
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"
Creating an opengl demo/game in VB??
quote:I''ve just been playing with Excel, and it''s impossible to set up a device context to
render to - So the answer is no, you can''t create OpenGL games in VBA!
Why? AFAIK VBA can export functions from dlls, so find Userform''s window using WinAPI functions and then initialize ogl , smth like:
Declare Function wglCreateContext(hdc As Long) Lib "opengl32.dll" As Long
Another way is to use some stuff written on more serious language and compiled into DLL or ActiveX component.
I''ve inserted OpenGL 3D button into Excel''s VBA, recieved events on it''s clicks and changed it''s apearance using our Indirect3D/Fastfruit ActiveX component. But now it''s not yet suitable for writting games.
If anybody is interested I can tell more about it.
From WinAPI Help:
Antoher function can give a hWnd of ANY window(I''ve got hWnd of Excel from Delphi):
HWND GetForegroundWindow(VOID);
quote:
The GetActiveWindow function retrieves the window handle to the active window associated with the thread that calls the function.
HWND GetActiveWindow(VOID)
Antoher function can give a hWnd of ANY window(I''ve got hWnd of Excel from Delphi):
HWND GetForegroundWindow(VOID);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement