Nikolay Sivov : comctl32/tests: Basic test for PGN_CALCSIZE.
Alexandre Julliard
julliard at winehq.org
Tue Feb 14 16:24:50 CST 2017
Module: wine
Branch: master
Commit: 948dd848fba5aff47ddc0a1aca3140296161642f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=948dd848fba5aff47ddc0a1aca3140296161642f
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Feb 14 07:47:38 2017 +0300
comctl32/tests: Basic test for PGN_CALCSIZE.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/pager.c | 2 ++
dlls/comctl32/tests/pager.c | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/dlls/comctl32/pager.c b/dlls/comctl32/pager.c
index ced32be..171d70e 100644
--- a/dlls/comctl32/pager.c
+++ b/dlls/comctl32/pager.c
@@ -1036,6 +1036,8 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
PAGER_INFO *infoPtr = (PAGER_INFO *)GetWindowLongPtrW(hwnd, 0);
+ TRACE("(%p, %#x, %#lx, %#lx)\n", hwnd, uMsg, wParam, lParam);
+
if (!infoPtr && (uMsg != WM_CREATE))
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
diff --git a/dlls/comctl32/tests/pager.c b/dlls/comctl32/tests/pager.c
index d352140..48753ff 100644
--- a/dlls/comctl32/tests/pager.c
+++ b/dlls/comctl32/tests/pager.c
@@ -83,6 +83,28 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
add_message(sequences, PAGER_SEQ_INDEX, &msg);
}
+ if (message == WM_NOTIFY)
+ {
+ NMHDR *nmhdr = (NMHDR *)lParam;
+
+ switch (nmhdr->code)
+ {
+ case PGN_CALCSIZE:
+ {
+ NMPGCALCSIZE *nmpgcs = (NMPGCALCSIZE *)lParam;
+ DWORD style = GetWindowLongA(nmpgcs->hdr.hwndFrom, GWL_STYLE);
+
+ if (style & PGS_HORZ)
+ ok(nmpgcs->dwFlag == PGF_CALCWIDTH, "Unexpected flags %#x.\n", nmpgcs->dwFlag);
+ else
+ ok(nmpgcs->dwFlag == PGF_CALCHEIGHT, "Unexpected flags %#x.\n", nmpgcs->dwFlag);
+ break;
+ }
+ default:
+ ;
+ }
+ }
+
defwndproc_counter++;
ret = DefWindowProcA(hwnd, message, wParam, lParam);
defwndproc_counter--;
More information about the wine-cvs
mailing list