From aea6e2fc882be7513d056ecf6fa594ba1ed41997 Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Tue, 8 Jan 2013 23:34:57 +0100 Subject: [PATCH] WIP on getting ColorDialog working --- ogl_editor/src/windows/Dialogs.c | 3 +++ ogl_editor/src/windows/RocketWindow.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ogl_editor/src/windows/Dialogs.c b/ogl_editor/src/windows/Dialogs.c index d175dde..388b04c 100644 --- a/ogl_editor/src/windows/Dialogs.c +++ b/ogl_editor/src/windows/Dialogs.c @@ -1,5 +1,7 @@ #include +extern HWND s_window; + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// int Dialog_open(wchar_t* path, int pathSize) @@ -46,6 +48,7 @@ void Dialog_showColorPicker(unsigned int* color) cc.lStructSize = sizeof(CHOOSECOLOR); cc.rgbResult = *color; cc.Flags = CC_FULLOPEN | CC_RGBINIT; + cc.hwndOwner = s_window; if (ChooseColor(&cc)) *color = cc.rgbResult; } \ No newline at end of file diff --git a/ogl_editor/src/windows/RocketWindow.c b/ogl_editor/src/windows/RocketWindow.c index 4e32288..aaa0412 100644 --- a/ogl_editor/src/windows/RocketWindow.c +++ b/ogl_editor/src/windows/RocketWindow.c @@ -13,7 +13,7 @@ void Window_buildMenu(); /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -static HWND s_window; +HWND s_window; static HINSTANCE s_instance; static HDC s_dc; static HGLRC s_context;