On 4/3/19 1:12 PM, Gabriel Ivăncescu wrote:
On 4/3/19 12:48 PM, Nikolay Sivov wrote:
On 4/1/19 3:19 PM, Gabriel Ivăncescu wrote:
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com
dlls/comctl32/tests/button.c | 210 +++++++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+)
diff --git a/dlls/comctl32/tests/button.c b/dlls/comctl32/tests/button.c index fef3de5..abbee64 100644 --- a/dlls/comctl32/tests/button.c +++ b/dlls/comctl32/tests/button.c @@ -1427,6 +1427,213 @@ static void register_parent_class(void) RegisterClassA(&cls); } +static void test_bcm_splitinfo(HWND hwnd) +{ + UINT button = GetWindowLongA(hwnd, GWL_STYLE) & BS_TYPEMASK; + int glyph_size = GetSystemMetrics(SM_CYMENUCHECK); + int border_w = GetSystemMetrics(SM_CXEDGE) * 2; + BUTTON_SPLITINFO info, dummy; + HIMAGELIST img; + BOOL ret;
+ /* Split buttons and their messages are not available pre-Vista */ + if (broken(LOBYTE(LOWORD(GetVersion())) < 6)) return;
Version check is easy to avoid here, do a valid BCM_GETSPLITINFO and win_skip() on failure, broken() is not meant for this.
Ok, but I should probably only win_skip once since it's in a loop, right? Or have a skip message for each button?
Depends on how much spam it generates, but sure, you can use a static flag to print it once.
I think such failure path in unnecessary, if img is NULL we'll just get a bunch of additional test failures.
Noted.