And the color dialog. All done! Now we just need to clean up and remove the kludge.

This commit is contained in:
Pietro Gagliardi 2018-05-02 21:13:35 -04:00
parent e3e88c7a6a
commit 4432e39a44
3 changed files with 240 additions and 47 deletions

View File

@ -1,6 +1,50 @@
// because Windows doesn't really support resources in static libraries, we have to embed this directly; oh well
/*
rcColorDialog DIALOGEX 13, 54, 344, 209
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_3DLOOK
CAPTION "Color"
FONT 9, "Segoe UI"
BEGIN
// this size should be big enough to get at least 256x256 on font sizes >= 8 pt
CTEXT "AaBbYyZz", rcColorSVChooser, 7, 7, 195, 195, SS_NOPREFIX | SS_BLACKRECT
static const uint8_t rcColorDialog[] = {
// width is the suggested slider height since this is vertical
CTEXT "AaBbYyZz", rcColorHSlider, 206, 7, 15, 195, SS_NOPREFIX | SS_BLACKRECT
LTEXT "Preview:", -1, 230, 7, 107, 9, SS_NOPREFIX
CTEXT "AaBbYyZz", rcPreview, 230, 16, 107, 20, SS_NOPREFIX | SS_BLACKRECT
LTEXT "Opacity:", -1, 230, 45, 107, 9, SS_NOPREFIX
CTEXT "AaBbYyZz", rcOpacitySlider, 230, 54, 107, 15, SS_NOPREFIX | SS_BLACKRECT
LTEXT "&H:", rcHLabel, 230, 81, 8, 8
EDITTEXT rcH, 238, 78, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&S:", rcSLabel, 230, 95, 8, 8
EDITTEXT rcS, 238, 92, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&V:", rcVLabel, 230, 109, 8, 8
EDITTEXT rcV, 238, 106, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&R:", rcRLabel, 277, 81, 8, 8
EDITTEXT rcRDouble, 285, 78, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
EDITTEXT rcRInt, 315, 78, 20, 14, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&G:", rcGLabel, 277, 95, 8, 8
EDITTEXT rcGDouble, 285, 92, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
EDITTEXT rcGInt, 315, 92, 20, 14, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&B:", rcBLabel, 277, 109, 8, 8
EDITTEXT rcBDouble, 285, 106, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
EDITTEXT rcBInt, 315, 106, 20, 14, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&A:", rcALabel, 277, 123, 8, 8
EDITTEXT rcADouble, 285, 120, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
EDITTEXT rcAInt, 315, 120, 20, 14, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "He&x:", rcHexLabel, 269, 146, 16, 8
EDITTEXT rcHex, 285, 143, 50, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
DEFPUSHBUTTON "OK", IDOK, 243, 188, 45, 14, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, 292, 188, 45, 14, WS_GROUP
END
*/
static const uint8_t data_rcColorDialog[] = {
0x01, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xC4, 0x00, 0xC8, 0x80,
0x1C, 0x00, 0x0D, 0x00, 0x36, 0x00, 0x58, 0x01,
@ -145,5 +189,5 @@ static const uint8_t rcColorDialog[] = {
0x43, 0x00, 0x61, 0x00, 0x6E, 0x00, 0x63, 0x00,
0x65, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static_assert(ARRAYSIZE(rcColorDialog) == 1144, "wrong size for resource rcColorDialog");
static_assert(ARRAYSIZE(data_rcColorDialog) == 1144, "wrong size for resource rcColorDialog");

View File

@ -1249,9 +1249,202 @@ static INT_PTR CALLBACK colorDialogDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam,
return FALSE;
}
// because Windows doesn't really support resources in static libraries, we have to embed this directly; oh well
/*
rcColorDialog DIALOGEX 13, 54, 344, 209
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_3DLOOK
CAPTION "Color"
FONT 9, "Segoe UI"
BEGIN
// this size should be big enough to get at least 256x256 on font sizes >= 8 pt
CTEXT "AaBbYyZz", rcColorSVChooser, 7, 7, 195, 195, SS_NOPREFIX | SS_BLACKRECT
// width is the suggested slider height since this is vertical
CTEXT "AaBbYyZz", rcColorHSlider, 206, 7, 15, 195, SS_NOPREFIX | SS_BLACKRECT
LTEXT "Preview:", -1, 230, 7, 107, 9, SS_NOPREFIX
CTEXT "AaBbYyZz", rcPreview, 230, 16, 107, 20, SS_NOPREFIX | SS_BLACKRECT
LTEXT "Opacity:", -1, 230, 45, 107, 9, SS_NOPREFIX
CTEXT "AaBbYyZz", rcOpacitySlider, 230, 54, 107, 15, SS_NOPREFIX | SS_BLACKRECT
LTEXT "&H:", rcHLabel, 230, 81, 8, 8
EDITTEXT rcH, 238, 78, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&S:", rcSLabel, 230, 95, 8, 8
EDITTEXT rcS, 238, 92, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&V:", rcVLabel, 230, 109, 8, 8
EDITTEXT rcV, 238, 106, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&R:", rcRLabel, 277, 81, 8, 8
EDITTEXT rcRDouble, 285, 78, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
EDITTEXT rcRInt, 315, 78, 20, 14, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&G:", rcGLabel, 277, 95, 8, 8
EDITTEXT rcGDouble, 285, 92, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
EDITTEXT rcGInt, 315, 92, 20, 14, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&B:", rcBLabel, 277, 109, 8, 8
EDITTEXT rcBDouble, 285, 106, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
EDITTEXT rcBInt, 315, 106, 20, 14, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&A:", rcALabel, 277, 123, 8, 8
EDITTEXT rcADouble, 285, 120, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
EDITTEXT rcAInt, 315, 120, 20, 14, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "He&x:", rcHexLabel, 269, 146, 16, 8
EDITTEXT rcHex, 285, 143, 50, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
DEFPUSHBUTTON "OK", IDOK, 243, 188, 45, 14, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, 292, 188, 45, 14, WS_GROUP
END
*/
static const uint8_t data_rcColorDialog[] = {
0x01, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xC4, 0x00, 0xC8, 0x80,
0x1C, 0x00, 0x0D, 0x00, 0x36, 0x00, 0x58, 0x01,
0xD1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00,
0x6F, 0x00, 0x6C, 0x00, 0x6F, 0x00, 0x72, 0x00,
0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x01,
0x53, 0x00, 0x65, 0x00, 0x67, 0x00, 0x6F, 0x00,
0x65, 0x00, 0x20, 0x00, 0x55, 0x00, 0x49, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x02, 0x50,
0x07, 0x00, 0x07, 0x00, 0xC3, 0x00, 0xC3, 0x00,
0x4C, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x82, 0x00,
0x41, 0x00, 0x61, 0x00, 0x42, 0x00, 0x62, 0x00,
0x59, 0x00, 0x79, 0x00, 0x5A, 0x00, 0x7A, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x02, 0x50,
0xCE, 0x00, 0x07, 0x00, 0x0F, 0x00, 0xC3, 0x00,
0x4D, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x82, 0x00,
0x41, 0x00, 0x61, 0x00, 0x42, 0x00, 0x62, 0x00,
0x59, 0x00, 0x79, 0x00, 0x5A, 0x00, 0x7A, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x02, 0x50,
0xE6, 0x00, 0x07, 0x00, 0x6B, 0x00, 0x09, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x00,
0x50, 0x00, 0x72, 0x00, 0x65, 0x00, 0x76, 0x00,
0x69, 0x00, 0x65, 0x00, 0x77, 0x00, 0x3A, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x02, 0x50,
0xE6, 0x00, 0x10, 0x00, 0x6B, 0x00, 0x14, 0x00,
0x4E, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x82, 0x00,
0x41, 0x00, 0x61, 0x00, 0x42, 0x00, 0x62, 0x00,
0x59, 0x00, 0x79, 0x00, 0x5A, 0x00, 0x7A, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x02, 0x50,
0xE6, 0x00, 0x2D, 0x00, 0x6B, 0x00, 0x09, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x82, 0x00,
0x4F, 0x00, 0x70, 0x00, 0x61, 0x00, 0x63, 0x00,
0x69, 0x00, 0x74, 0x00, 0x79, 0x00, 0x3A, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x02, 0x50,
0xE6, 0x00, 0x36, 0x00, 0x6B, 0x00, 0x0F, 0x00,
0x4F, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x82, 0x00,
0x41, 0x00, 0x61, 0x00, 0x42, 0x00, 0x62, 0x00,
0x59, 0x00, 0x79, 0x00, 0x5A, 0x00, 0x7A, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x50,
0xE6, 0x00, 0x51, 0x00, 0x08, 0x00, 0x08, 0x00,
0x5C, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x82, 0x00,
0x26, 0x00, 0x48, 0x00, 0x3A, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x80, 0x00, 0x81, 0x50,
0xEE, 0x00, 0x4E, 0x00, 0x1E, 0x00, 0x0E, 0x00,
0x50, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x50,
0xE6, 0x00, 0x5F, 0x00, 0x08, 0x00, 0x08, 0x00,
0x5D, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x82, 0x00,
0x26, 0x00, 0x53, 0x00, 0x3A, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x80, 0x00, 0x81, 0x50,
0xEE, 0x00, 0x5C, 0x00, 0x1E, 0x00, 0x0E, 0x00,
0x51, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x50,
0xE6, 0x00, 0x6D, 0x00, 0x08, 0x00, 0x08, 0x00,
0x5E, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x82, 0x00,
0x26, 0x00, 0x56, 0x00, 0x3A, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x80, 0x00, 0x81, 0x50,
0xEE, 0x00, 0x6A, 0x00, 0x1E, 0x00, 0x0E, 0x00,
0x52, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x50,
0x15, 0x01, 0x51, 0x00, 0x08, 0x00, 0x08, 0x00,
0x5F, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x82, 0x00,
0x26, 0x00, 0x52, 0x00, 0x3A, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x80, 0x00, 0x81, 0x50,
0x1D, 0x01, 0x4E, 0x00, 0x1E, 0x00, 0x0E, 0x00,
0x53, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x80, 0x20, 0x81, 0x50,
0x3B, 0x01, 0x4E, 0x00, 0x14, 0x00, 0x0E, 0x00,
0x54, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x50,
0x15, 0x01, 0x5F, 0x00, 0x08, 0x00, 0x08, 0x00,
0x60, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x82, 0x00,
0x26, 0x00, 0x47, 0x00, 0x3A, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x80, 0x00, 0x81, 0x50,
0x1D, 0x01, 0x5C, 0x00, 0x1E, 0x00, 0x0E, 0x00,
0x55, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x80, 0x20, 0x81, 0x50,
0x3B, 0x01, 0x5C, 0x00, 0x14, 0x00, 0x0E, 0x00,
0x56, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x50,
0x15, 0x01, 0x6D, 0x00, 0x08, 0x00, 0x08, 0x00,
0x61, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x82, 0x00,
0x26, 0x00, 0x42, 0x00, 0x3A, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x80, 0x00, 0x81, 0x50,
0x1D, 0x01, 0x6A, 0x00, 0x1E, 0x00, 0x0E, 0x00,
0x57, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x80, 0x20, 0x81, 0x50,
0x3B, 0x01, 0x6A, 0x00, 0x14, 0x00, 0x0E, 0x00,
0x58, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x50,
0x15, 0x01, 0x7B, 0x00, 0x08, 0x00, 0x08, 0x00,
0x62, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x82, 0x00,
0x26, 0x00, 0x41, 0x00, 0x3A, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x80, 0x00, 0x81, 0x50,
0x1D, 0x01, 0x78, 0x00, 0x1E, 0x00, 0x0E, 0x00,
0x59, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x80, 0x20, 0x81, 0x50,
0x3B, 0x01, 0x78, 0x00, 0x14, 0x00, 0x0E, 0x00,
0x5A, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x50,
0x0D, 0x01, 0x92, 0x00, 0x10, 0x00, 0x08, 0x00,
0x63, 0x04, 0x00, 0x00, 0xFF, 0xFF, 0x82, 0x00,
0x48, 0x00, 0x65, 0x00, 0x26, 0x00, 0x78, 0x00,
0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
0x80, 0x00, 0x81, 0x50, 0x1D, 0x01, 0x8F, 0x00,
0x32, 0x00, 0x0E, 0x00, 0x5B, 0x04, 0x00, 0x00,
0xFF, 0xFF, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x03, 0x50, 0xF3, 0x00, 0xBC, 0x00,
0x2D, 0x00, 0x0E, 0x00, 0x01, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0x80, 0x00, 0x4F, 0x00, 0x4B, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x50,
0x24, 0x01, 0xBC, 0x00, 0x2D, 0x00, 0x0E, 0x00,
0x02, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x80, 0x00,
0x43, 0x00, 0x61, 0x00, 0x6E, 0x00, 0x63, 0x00,
0x65, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static_assert(ARRAYSIZE(data_rcColorDialog) == 1144, "wrong size for resource rcColorDialog");
BOOL showColorDialog(HWND parent, struct colorDialogRGBA *c)
{
switch (DialogBoxParamW(hInstance, MAKEINTRESOURCE(rcColorDialog), parent, colorDialogDlgProc, (LPARAM) c)) {
switch (DialogBoxIndirectParamW(hInstance, (const DLGTEMPLATE *) data_rcColorDialog, parent, colorDialogDlgProc, (LPARAM) c)) {
case 1: // cancel
return FALSE;
case 2: // ok

View File

@ -11,47 +11,3 @@
#ifndef _UI_STATIC
ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST "libui.manifest"
#endif
rcColorDialog DIALOGEX 13, 54, 344, 209
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_3DLOOK
CAPTION "Color"
FONT 9, "Segoe UI"
BEGIN
// this size should be big enough to get at least 256x256 on font sizes >= 8 pt
CTEXT "AaBbYyZz", rcColorSVChooser, 7, 7, 195, 195, SS_NOPREFIX | SS_BLACKRECT
// width is the suggested slider height since this is vertical
CTEXT "AaBbYyZz", rcColorHSlider, 206, 7, 15, 195, SS_NOPREFIX | SS_BLACKRECT
LTEXT "Preview:", -1, 230, 7, 107, 9, SS_NOPREFIX
CTEXT "AaBbYyZz", rcPreview, 230, 16, 107, 20, SS_NOPREFIX | SS_BLACKRECT
LTEXT "Opacity:", -1, 230, 45, 107, 9, SS_NOPREFIX
CTEXT "AaBbYyZz", rcOpacitySlider, 230, 54, 107, 15, SS_NOPREFIX | SS_BLACKRECT
LTEXT "&H:", rcHLabel, 230, 81, 8, 8
EDITTEXT rcH, 238, 78, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&S:", rcSLabel, 230, 95, 8, 8
EDITTEXT rcS, 238, 92, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&V:", rcVLabel, 230, 109, 8, 8
EDITTEXT rcV, 238, 106, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&R:", rcRLabel, 277, 81, 8, 8
EDITTEXT rcRDouble, 285, 78, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
EDITTEXT rcRInt, 315, 78, 20, 14, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&G:", rcGLabel, 277, 95, 8, 8
EDITTEXT rcGDouble, 285, 92, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
EDITTEXT rcGInt, 315, 92, 20, 14, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&B:", rcBLabel, 277, 109, 8, 8
EDITTEXT rcBDouble, 285, 106, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
EDITTEXT rcBInt, 315, 106, 20, 14, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "&A:", rcALabel, 277, 123, 8, 8
EDITTEXT rcADouble, 285, 120, 30, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
EDITTEXT rcAInt, 315, 120, 20, 14, ES_LEFT | ES_AUTOHSCROLL | ES_NUMBER | WS_TABSTOP, WS_EX_CLIENTEDGE
LTEXT "He&x:", rcHexLabel, 269, 146, 16, 8
EDITTEXT rcHex, 285, 143, 50, 14, ES_LEFT | ES_AUTOHSCROLL | WS_TABSTOP, WS_EX_CLIENTEDGE
DEFPUSHBUTTON "OK", IDOK, 243, 188, 45, 14, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, 292, 188, 45, 14, WS_GROUP
END