#include <CDialogResizeHelper.h>
Definition at line 1 of file CDialogResizeHelper.h.
struct CDialogResizeHelper::Param |
t_size paramCount CDialogResizeHelper::CDialogResizeHelper |
( |
const TParam(&) |
src[paramCount], |
|
|
CRect const & |
minMaxRange = CRect(0,0,0,0) |
|
) |
| |
|
inline |
Definition at line 23 of file CDialogResizeHelper.h.
void InitMinMax(const CRect &range)
void InitTable(const Param *table, t_size tableSize)
bool CDialogResizeHelper::_EvalRect |
( |
t_size |
index, |
|
|
CSize |
wndSize, |
|
|
CRect & |
out |
|
) |
| const |
|
private |
Definition at line 13 of file CDialogResizeHelper.cpp.
15 const Param & e =
m_table[index];
pfc::map_t< UINT, CRect > m_origRects
pfc::array_t< Param > m_table
t_int32 rint32(double p_val)
bool query(const _t_key &p_key, _t_value &p_value) const
void CDialogResizeHelper::AddSizeGrip |
( |
| ) |
|
|
private |
Definition at line 100 of file CDialogResizeHelper.cpp.
104 if (
m_thisWnd.GetWindowLong(GWL_STYLE) & WS_POPUP) {
105 m_sizeGrip = CreateWindowEx(0, WC_SCROLLBAR, _T(
""), WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | SBS_SIZEGRIP | SBS_SIZEBOXBOTTOMRIGHTALIGN,
106 0, 0, CW_USEDEFAULT, CW_USEDEFAULT,
112 m_sizeGrip.SetWindowPos(NULL, rc.right - (rc_grip.right - rc_grip.left), rc.bottom - (rc_grip.bottom - rc_grip.top), 0, 0, SWP_NOZORDER | SWP_NOSIZE);
bool CDialogResizeHelper::EvalRect |
( |
UINT |
id, |
|
|
CRect & |
out |
|
) |
| const |
Definition at line 3 of file CDialogResizeHelper.cpp.
6 CRect client; WIN32_OP_D(
m_thisWnd.GetClientRect(client) );
7 return _EvalRect(walk, client.Size(), out);
bool _EvalRect(t_size index, CSize wndSize, CRect &out) const
pfc::array_t< Param > m_table
void CDialogResizeHelper::InitMinMax |
( |
const CRect & |
range | ) |
|
void CDialogResizeHelper::InitTable |
( |
const Param * |
table, |
|
|
t_size |
tableSize |
|
) |
| |
void CDialogResizeHelper::InitTable |
( |
const ParamOld * |
table, |
|
|
t_size |
tableSize |
|
) |
| |
Definition at line 123 of file CDialogResizeHelper.cpp.
125 for(
t_size walk = 0; walk < tableSize; ++walk) {
128 entry.
id = table[walk].id;
pfc::array_t< Param > m_table
dialog_resize_helper::param ParamOld
CDialogResizeHelper::MSG_WM_SIZE |
( |
OnSize |
| ) |
|
void CDialogResizeHelper::OnDestroy |
( |
| ) |
|
|
private |
void CDialogResizeHelper::OnGetMinMaxInfo |
( |
LPMINMAXINFO |
lpMMI | ) |
const |
|
private |
Definition at line 57 of file CDialogResizeHelper.cpp.
59 const DWORD dwStyle =
m_thisWnd.GetWindowLong(GWL_STYLE);
60 const DWORD dwExStyle =
m_thisWnd.GetWindowLong(GWL_EXSTYLE);
63 r.left = 0; r.right =
max_x;
64 r.top = 0; r.bottom =
max_y;
66 AdjustWindowRectEx(&r, dwStyle, FALSE, dwExStyle);
67 info->ptMaxTrackSize.x = r.right - r.left;
68 info->ptMaxTrackSize.y = r.bottom - r.top;
72 r.left = 0; r.right =
min_x;
73 r.top = 0; r.bottom =
min_y;
75 AdjustWindowRectEx(&r, dwStyle, FALSE, dwExStyle);
76 info->ptMinTrackSize.x = r.right - r.left;
77 info->ptMinTrackSize.y = r.bottom - r.top;
void info(const char *p_message)
void CDialogResizeHelper::OnInitDialog |
( |
CWindow |
thisWnd | ) |
|
|
private |
Definition at line 81 of file CDialogResizeHelper.cpp.
BOOL GetChildWindowRect(HWND wnd, UINT id, RECT *child)
pfc::map_t< UINT, CRect > m_origRects
pfc::array_t< Param > m_table
void set(const _t_key &p_key, const _t_value &p_value)
void CDialogResizeHelper::OnSize |
( |
UINT |
nType, |
|
|
CSize |
size |
|
) |
| |
|
private |
Definition at line 31 of file CDialogResizeHelper.cpp.
34 HDWP hWinPosInfo = BeginDeferWindowPos(
m_table.get_size() + (
m_sizeGrip != NULL ? 1 : 0) );
38 hWinPosInfo = DeferWindowPos(hWinPosInfo,
m_thisWnd.GetDlgItem(
m_table[n].id), 0, rc.left,rc.top,rc.Width(),rc.Height(),SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS);
45 DWORD flags = SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOCOPYBITS;
46 if (IsZoomed(
m_thisWnd)) flags |= SWP_HIDEWINDOW;
47 else flags |= SWP_SHOWWINDOW;
48 hWinPosInfo = DeferWindowPos(hWinPosInfo,
m_sizeGrip, NULL, rc.right - (rc_grip.right - rc_grip.left), rc.bottom - (rc_grip.bottom - rc_grip.top), 0, 0, flags );
51 EndDeferWindowPos(hWinPosInfo);
bool _EvalRect(t_size index, CSize wndSize, CRect &out) const
pfc::array_t< Param > m_table
void CDialogResizeHelper::set_max_size |
( |
unsigned |
x, |
|
|
unsigned |
y |
|
) |
| |
|
inline |
void CDialogResizeHelper::set_min_size |
( |
unsigned |
x, |
|
|
unsigned |
y |
|
) |
| |
|
inline |
pfc::map_t<UINT, CRect> CDialogResizeHelper::m_origRects |
|
private |
CRect CDialogResizeHelper::m_rcOrigClient |
|
private |
CWindow CDialogResizeHelper::m_sizeGrip |
|
private |
CWindow CDialogResizeHelper::m_thisWnd |
|
private |
unsigned CDialogResizeHelper::max_x |
|
private |
unsigned CDialogResizeHelper::max_y |
|
private |
unsigned CDialogResizeHelper::min_x |
|
private |
unsigned CDialogResizeHelper::min_y |
|
private |
The documentation for this class was generated from the following files: