WIP on getting ColorDialog working

This commit is contained in:
Daniel Collin 2013-01-08 23:34:57 +01:00
parent e41d53b1e0
commit aea6e2fc88
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,7 @@
#include <windows.h>
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;
}

View File

@ -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;