Controller base template class for resizable dialogs. More...
#include <window.h>


Public Types | |
| typedef BASE | super |
Public Member Functions | |
| ResizeController (HWND hwnd) | |
| LRESULT | WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam) |
| virtual void | GetClientSpace (PRECT prect) |
Protected Attributes | |
| ResizeManager | _resize_mgr |
Controller base template class for resizable dialogs.
Definition at line 514 of file window.h.
| typedef BASE ResizeController< BASE >::super |
Reimplemented in FindProgramDlg, MdiSdiDlg, and TrayNotifyDlg.
| ResizeController< BASE >::ResizeController | ( | HWND | hwnd ) | [inline] |
Definition at line 518 of file window.h.
: super(hwnd), _resize_mgr(hwnd) { }
| virtual void ResizeController< BASE >::GetClientSpace | ( | PRECT | prect ) | [inline, virtual] |
Definition at line 545 of file window.h.
Referenced by ResizeController< Dialog >::WndProc().
{
if (!IsIconic(this->_hwnd)) {
GetClientRect(this->_hwnd, prect);
} else {
WINDOWPLACEMENT wp;
GetWindowPlacement(this->_hwnd, &wp);
prect->left = prect->top = 0;
prect->right = wp.rcNormalPosition.right-wp.rcNormalPosition.left-
2*(GetSystemMetrics(SM_CXSIZEFRAME)+GetSystemMetrics(SM_CXEDGE));
prect->bottom = wp.rcNormalPosition.bottom-wp.rcNormalPosition.top-
2*(GetSystemMetrics(SM_CYSIZEFRAME)+GetSystemMetrics(SM_CYEDGE))-
GetSystemMetrics(SM_CYCAPTION)-GetSystemMetrics(SM_CYMENUSIZE);
}
}

| LRESULT ResizeController< BASE >::WndProc | ( | UINT | nmsg, |
| WPARAM | wparam, | ||
| LPARAM | lparam | ||
| ) | [inline] |
Reimplemented in FindProgramDlg, and TrayNotifyDlg.
Definition at line 524 of file window.h.
Referenced by ResizeController< Dialog >::WndProc().
{
switch(nmsg) {
case PM_FRM_CALC_CLIENT:
GetClientSpace((PRECT)lparam);
return TRUE;
case WM_SIZE:
if (wparam != SIZE_MINIMIZED)
_resize_mgr.HandleSize(LOWORD(lparam), HIWORD(lparam));
goto def;
case WM_GETMINMAXINFO:
_resize_mgr.SetMinMaxInfo((LPMINMAXINFO)lparam);
goto def;
default: def:
return super::WndProc(nmsg, wparam, lparam);
}
}

ResizeManager ResizeController< BASE >::_resize_mgr [protected] |
Definition at line 562 of file window.h.
Referenced by ResizeController< Dialog >::WndProc().
|
ROS Explorer Source Code Documentation
generated on 02.01.2013 by
|