Hi all.
I want to use the library in a Dialog application MFC. For example consider the wizard included in dx sdk 8.1 that builds a simple dialog with a frame in that you see a teapot.
Use in a MFC single Dialog application
use createDeviceEx instead of createDevice
In Irrlicht 0.10.0 "createDeviceEx" can accept a window's handle as a input.
see a code fragment as below:
...
HWND hWnd;
hWnd = GetDlgItem(IDC_STATIC)->m_hWnd;
SIrrlichtCreationParameters p;
p.DriverType = EDT_SOFTWARE;
p.WindowId = (s32)hWnd;
IrrlichtDevice *device = createDeviceEx(p);
...
I think it is natural. And I have tested it in a dialog-based MFC program.
no need to modify the source code.
see a code fragment as below:
...
HWND hWnd;
hWnd = GetDlgItem(IDC_STATIC)->m_hWnd;
SIrrlichtCreationParameters p;
p.DriverType = EDT_SOFTWARE;
p.WindowId = (s32)hWnd;
IrrlichtDevice *device = createDeviceEx(p);
...
I think it is natural. And I have tested it in a dialog-based MFC program.
no need to modify the source code.
I wish someone would do an example or something.
I'm trying to do this myself but the problem is I learned c++ from Irrlicht and have no experience with mfc and it's very confusing.
if I could get Irrlicht to work with mfc I could devolop alot of useful tools and projects with irrlicht that are not possable otherwise without rewritting alot of the engine.
I'm trying to do this myself but the problem is I learned c++ from Irrlicht and have no experience with mfc and it's very confusing.
if I could get Irrlicht to work with mfc I could devolop alot of useful tools and projects with irrlicht that are not possable otherwise without rewritting alot of the engine.
I was thinking of using MFC to create the GUI for some Irrlicht toolkits i'm planning. Then i came across www.wxwidgets.org . I thought using this (or a similar library) might be a better option as the application should then be compatible on all platforms supported by Irrlicht