Hello!
I am fairly new to
Win32, and got an question:
I want an overlapped window when I press button
ID_LIGHTS_LIGHTMAP.
Function called within the case when clicked on menu button for creation of Window:
void LIGHTMAP_OPTIONS(void)
{
RECT Rect;
GetWindowRect(MainWindow, &Rect);
HWND SettingsWin = CreateWindowEx(0, "BlankWindow", "LightMap Options",WS_VISIBLE, 100, 100, 256, 512, MainWindow, NULL, hInstance, NULL);
SetWindowLong(SettingsWin, GWL_HINSTANCE, (LONG)LIGHTMAP_WindowProc);
}
Case of the button ID:
case ID_LIGHTS_LIGHTMAP:
{
LIGHTMAP_OPTIONS();
}break;
WindowProc Handler:
//LightMapping Window Proc
LRESULT CALLBACK LIGHTMAP_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch ( uMsg )
{
case WM_COMMAND:
{
return 0;
} break;
case WM_CLOSE:
{
DestroyWindow(hWnd);
return 0;
} break;
}
return DefWindowProc(hWnd,uMsg,wParam,lParam);
}
Problem: New Window doesnt show up.
Hope there are some win32 experts out there.
Thanks,
RedEye