diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-09 16:24:07 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-09 16:24:07 -0400 |
| commit | e7fb5c94887b0b651e9e273ff64de37202464ae3 (patch) | |
| tree | f4332678c1c5b88a73e9afa226acc15591ab82e5 /windowspopover/main.c | |
| parent | a1a0616b5d6ad0183ab21f2947691eaa182c701d (diff) | |
More popover test code.
Diffstat (limited to 'windowspopover/main.c')
| -rw-r--r-- | windowspopover/main.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/windowspopover/main.c b/windowspopover/main.c index ae6f28b..c53422c 100644 --- a/windowspopover/main.c +++ b/windowspopover/main.c @@ -78,14 +78,29 @@ LRESULT CALLBACK popoverproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) SetWindowRgn(hwnd, region, TRUE); ReleaseDC(hwnd, dc); return 0; + case WM_NCCALCSIZE: + { + RECT *r = (RECT *) lParam; + NCCALCSIZE_PARAMS *np = (NCCALCSIZE_PARAMS *) lParam; + + if (wParam != FALSE) + r = &np->rgrc[0]; + printf("%d | %d %d %d %d\n", wParam, r->left, r->top, r->right, r->bottom); + r->left++; + r->top++; + r->right--; + r->bottom--; + r->top += ARROWHEIGHT; + return 0; + } case WM_ERASEBKGND: - return (LRESULT) NULL; + return (LRESULT) GetStockObject(HOLLOW_BRUSH); case WM_PAINT: -/* dc = BeginPaint(hwnd, &ps); + dc = BeginPaint(hwnd, &ps); GetClientRect(hwnd, &r); FillRect(dc, &r, GetSysColorBrush(COLOR_ACTIVECAPTION)); EndPaint(hwnd, &ps); -*/ return 0; + return 0; } return DefWindowProcW(hwnd, uMsg, wParam, lParam); } |
