diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-09 13:51:01 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-09 13:51:01 -0400 |
| commit | 73f68412726f294ff4668e468fb595bb77d50e7e (patch) | |
| tree | ca4acb09e61a422bf1a9d86735d165b1862f8c2d /new/container_windows.c | |
| parent | 9c2fe78f78eb161db5a21a6dac0c01dcecbf3244 (diff) | |
Implemented uiWindowSetMargined() on Windows.
Diffstat (limited to 'new/container_windows.c')
| -rw-r--r-- | new/container_windows.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/new/container_windows.c b/new/container_windows.c index a8e28a0..f4d00ba 100644 --- a/new/container_windows.c +++ b/new/container_windows.c @@ -55,7 +55,7 @@ BOOL sharedWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT * return FALSE; } -void resize(uiControl *control, HWND parent, RECT r) +void resize(uiControl *control, HWND parent, RECT r, RECT margin) { uiSizing d; HDC dc; @@ -83,6 +83,10 @@ void resize(uiControl *control, HWND parent, RECT r) logLastError("error restoring previous font into device context in resize()"); if (ReleaseDC(parent, dc) == 0) logLastError("error releasing DC in resize()"); + r.left += uiDlgUnitToX(margin.left, d.baseX); + r.top += uiDlgUnitToY(margin.top, d.baseY); + r.right -= uiDlgUnitToX(margin.right, d.baseX); + r.bottom -= uiDlgUnitToY(margin.bottom, d.baseY); (*(control->resize))(control, r.left, r.top, r.right - r.left, r.bottom - r.top, &d); } |
