I have a simple question about win32 API programming: Is it possible to somehow use the win32 API to load a Blitz3D app inside another window (created in C++)? I'm wondering if there's any way to embed a blitz3d render window within a C++ GUI app. I know this is possible with things like MDI, but I'm not sure if it can be done with a seperate application. Any help would be appreciated.
Blitz3D Window within a C++ Window?
Miscellaneous Forums/General Discussion/Blitz3D Window within a C++ Window? You might be able to reset the Direct3D7 device and pass it a seperate HWND, but otherwise I don't think it's possible to set a window as an MDI window after it's been created.
This coming from my limited experiences with Win32 application writing, as I generally either stick to C# or use GTK and C.
This coming from my limited experiences with Win32 application writing, as I generally either stick to C# or use GTK and C.
First download a program like "Winspector Spy" to find the blitz3d window that way you can get the window title + classname for FindWindow after you do this then you can do SetParent to parent the blitz3d window to the new window and ofcourse you will have to use GetWindowLong / SetWindowLong to take off the blitz3d titlebar ect.
heres a little example UNTESTED:
heres a little example UNTESTED:
Function ParentB3DWindow( Parent:int ) local classname:string = "NotePad"; local title:string = "Untitled - Notepad" local hwnd:int=FindWindow( classname, title ) local oldstyle:int = GetWindowLong( hwnd, GWL_STYLE ) SetWindowLong( hwnd, GWL_STYLE, oldstyle | WS_CHILD ) SetParent( hwnd, Parent ) End Function
Thanks for the replys. I'll see if I can get it to work now. :)
Thanks Perturbatio for showing me that one by Mr. Picklesworth! It works great! Sarge's code looks like it would work, too (it's similar to the code posted by Mr. Picklesworth, except using FindWindow instead of using the CommandLine). Thanks for the help. :)