On 9/30/20 6:16 AM, Jeff Smith wrote:
+#define INV CLR_INVALID
- struct color_values tests[] =
- {
/* WndProc will return NULL */
{NULL, INV, INV, INV, INV, INV},
/* WndProc will return non-object */
{(HBRUSH)(COLOR_HIGHLIGHT+1), INV, INV, INV, INV, INV},
/* WndProc will return object */
{NULL, RGB(255,0,0), INV, INV, INV, INV},
{NULL, RGB(255,0,0), INV, INV, INV, INV, TRANSPARENT},
{NULL, RGB(255,0,0), RGB(0,255,0), RGB(0,0,255), RGB(255,255,0),
RGB(255,0,255)},
{NULL, RGB(255,0,0), RGB(0,255,0), RGB(0,0,255), RGB(255,255,0),
RGB(255,0,255), TRANSPARENT},
- };
+#undef INV
Doesn't seem worth it to temporarily declare a macro for this.
- int is_simple = !strcmp(class,"static") && style == SS_SIMPLE;
- int is_groupbox = !strcmp(class,"button") && style == BS_GROUPBOX;
- int is_pushbutton = !strcmp(class,"button") &&
(style == BS_PUSHBUTTON || style == BS_DEFPUSHBUTTON || style == BS_USERBUTTON);
- test_style_message("static", SS_SIMPLE, 5, 5);
- test_style_message("static", SS_LEFT, 5, 5);
- test_style_message("static", SS_RIGHT, 95, 5);
- test_style_message("static", SS_CENTER, 50, 5);
- test_style_message("static", SS_LEFTNOWORDWRAP, 5, 5);
- test_style_message("button", BS_CHECKBOX, 25, 50);
- test_style_message("button", BS_AUTOCHECKBOX, 25, 50);
- test_style_message("button", BS_RADIOBUTTON, 25, 50);
- test_style_message("button", BS_AUTORADIOBUTTON, 25, 50);
- test_style_message("button", BS_3STATE, 25, 50);
- test_style_message("button", BS_AUTO3STATE, 25, 50);
- test_style_message("button", BS_GROUPBOX, 20, 5);
- test_style_message("button", BS_PUSHBUTTON, 50, 50);
- test_style_message("button", BS_DEFPUSHBUTTON, 50, 50);
- test_style_message("button", BS_USERBUTTON, 50, 50);
I think it makes more sense to move this to respective control file, especially when duplicating this in comctl32 tests.