SFML community forums
Help => Graphics => Topic started by: nbd on February 21, 2014, 03:31:03 pm
-
I have a simple test application which does nothing except of creating a new Render window from an existing HWND with the following statement:
m_pRendWnd = new sf::RenderWindow( hWnd );
On exit the render window is destroyed as follows:
if ( m_pRendWnd ) {
m_pRendWnd->setActive(false);
m_pRendWnd->close();
delete m_pRendWnd;
}
When I start this program and close it, the debugger shows the following message:
WGL Message:WGL: DDraw: UpdateClipList: GetClipList (1): DDERROR = DDERR_GENERIC
WGL Message:WGL: DDraw: UpdateClipList: GetClipList (2): DDERROR = DDERR_GENERIC
WGL Message:System Error: (1114):dettachMessageHook
Why this message is displayed?
-
Where does the HWND come from? How was that window created?
-
This is a basic standard Windows application and with a single main window created with
hWnd = CreateWindow(
szWindowClass,
szTitle,
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
0,
1000 + (GetSystemMetrics(SM_CXFRAME) * 2), // Initial window width
1000 + (GetSystemMetrics(SM_CYFRAME) * 2) +
GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYMENU), // Initial height
NULL,
NULL,
hInstance,
NULL);
The destruction of SFML RenderWindow is called before calling DestroyWindow(hWnd); for the main (and single) hWnd for which RenderWindow was created.