Go to the source code of this file.
struct cfgDialogPositionData::DeOverlapState |
static void AdjustRectToScreenArea |
( |
CRect & |
rc, |
|
|
CRect |
rcParent |
|
) |
| |
|
static |
Definition at line 6 of file WindowPositionUtils.h.
7 HMONITOR monitor = MonitorFromRect(rcParent,MONITOR_DEFAULTTONEAREST);
8 MONITORINFO mi = {
sizeof(MONITORINFO)};
9 if (GetMonitorInfo(monitor,&mi)) {
10 const CRect clip = mi.rcWork;
11 if (rc.right > clip.right) rc.OffsetRect(clip.right - rc.right, 0);
12 if (rc.bottom > clip.bottom) rc.OffsetRect(0, clip.bottom - rc.bottom);
13 if (rc.left < clip.left) rc.OffsetRect(clip.left - rc.left, 0);
14 if (rc.top < clip.top) rc.OffsetRect(0, clip.top - rc.top);
static BOOL AdjustWindowRectHelper |
( |
CWindow |
wnd, |
|
|
CRect & |
rc |
|
) |
| |
|
static |
Definition at line 1 of file WindowPositionUtils.h.
2 const DWORD style = wnd.GetWindowLong(GWL_STYLE), exstyle = wnd.GetWindowLong(GWL_EXSTYLE);
3 return AdjustWindowRectEx(&rc,style,(style & WS_POPUP) ? wnd.GetMenu() != NULL : FALSE, exstyle);
static BOOL CenterWindowAbove |
( |
CWindow |
wnd, |
|
|
CWindow |
wndParent |
|
) |
| |
|
static |
Definition at line 41 of file WindowPositionUtils.h.
44 return wnd.SetWindowPos(NULL,rc,SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
static BOOL CenterWindowGetRect(CWindow wnd, CWindow wndParent, CRect &out)
static BOOL CenterWindowGetRect |
( |
CWindow |
wnd, |
|
|
CWindow |
wndParent, |
|
|
CRect & |
out |
|
) |
| |
|
static |
Definition at line 28 of file WindowPositionUtils.h.
30 if (!wndParent.GetWindowRect(&parent) || !wnd.GetWindowRect(&child))
return FALSE;
32 CPoint origin = parent.CenterPoint();
33 origin.Offset( - child.Width() / 2, - child.Height() / 2);
34 child.OffsetRect( origin - child.TopLeft() );
static void AdjustRectToScreenArea(CRect &rc, CRect rcParent)
Definition at line 272 of file WindowPositionUtils.h.
273 stream >> value.m_width >> value.m_height;
275 stream >> value.m_posX >> value.m_posY >> value.m_dpiX >> value.m_dpiY;
276 }
catch(exception_io_data) {
Definition at line 282 of file WindowPositionUtils.h.
283 return stream << value.m_width << value.m_height << value.m_posX << value.m_posY << value.m_dpiX << value.m_dpiY;
static BOOL GetClientRectAsSC |
( |
CWindow |
wnd, |
|
|
CRect & |
rc |
|
) |
| |
|
static |
Definition at line 18 of file WindowPositionUtils.h.
20 if (!wnd.GetClientRect(temp))
return FALSE;
21 if (temp.IsRectNull())
return FALSE;
22 if (!wnd.ClientToScreen(temp))
return FALSE;
static BOOL ShowWindowCentered |
( |
CWindow |
wnd, |
|
|
CWindow |
wndParent |
|
) |
| |
|
static |
Definition at line 47 of file WindowPositionUtils.h.
50 return wnd.SetWindowPos(HWND_TOP,rc,SWP_NOSIZE | SWP_SHOWWINDOW);
static BOOL CenterWindowGetRect(CWindow wnd, CWindow wndParent, CRect &out)