I can't understand why this happens. Aren't they two different instances?
Also when used in GUI framework the messages that closeDevice sends, tells the framework to close the application:
Code: Select all
void CIrrDeviceWin32::closeDevice()
{
MSG msg;
PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE);
PostQuitMessage(0);
PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE);
DestroyWindow(HWnd);
Close=true;
}
Is that bad? The window handle is being deleted by the GUI framework and I don't use the device after that so it should not be a problem, right?
Thanks.