ResizeController< BASE > Struct Template Reference

Controller base template class for resizable dialogs. More...

#include <window.h>

Inheritance diagram for ResizeController< BASE >:

Inheritance graph
[legend]
Collaboration diagram for ResizeController< BASE >:

Collaboration graph
[legend]

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

Detailed Description

template<typename BASE>
struct ResizeController< BASE >

Controller base template class for resizable dialogs.

Definition at line 497 of file window.h.


Member Typedef Documentation

template<typename BASE>
typedef BASE ResizeController< BASE >::super

Definition at line 499 of file window.h.


Constructor & Destructor Documentation

template<typename BASE>
ResizeController< BASE >::ResizeController ( HWND  hwnd  )  [inline]

Definition at line 501 of file window.h.

00502      :  super(hwnd),
00503         _resize_mgr(hwnd)
00504     {
00505     }


Member Function Documentation

template<typename BASE>
LRESULT ResizeController< BASE >::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
) [inline]

Definition at line 507 of file window.h.

References ResizeController< BASE >::_resize_mgr, ResizeController< BASE >::GetClientSpace(), ResizeManager::HandleSize(), PM_FRM_CALC_CLIENT, and ResizeManager::SetMinMaxInfo().

00508     {
00509         switch(nmsg) {
00510           case PM_FRM_CALC_CLIENT:
00511             GetClientSpace((PRECT)lparam);
00512             return TRUE;
00513 
00514           case WM_SIZE:
00515             if (wparam != SIZE_MINIMIZED)
00516                 _resize_mgr.HandleSize(LOWORD(lparam), HIWORD(lparam));
00517             goto def;
00518 
00519           case WM_GETMINMAXINFO:
00520             _resize_mgr.SetMinMaxInfo((LPMINMAXINFO)lparam);
00521             goto def;
00522 
00523           default: def:
00524             return super::WndProc(nmsg, wparam, lparam);
00525         }
00526     }

Here is the call graph for this function:

template<typename BASE>
virtual void ResizeController< BASE >::GetClientSpace ( PRECT  prect  )  [inline, virtual]

Definition at line 528 of file window.h.

Referenced by ResizeController< BASE >::WndProc().

00529     {
00530          if (!IsIconic(this->_hwnd)) {
00531             GetClientRect(this->_hwnd, prect);
00532          } else {
00533             WINDOWPLACEMENT wp;
00534             GetWindowPlacement(this->_hwnd, &wp);
00535             prect->left = prect->top = 0;
00536             prect->right = wp.rcNormalPosition.right-wp.rcNormalPosition.left-
00537                 2*(GetSystemMetrics(SM_CXSIZEFRAME)+GetSystemMetrics(SM_CXEDGE));
00538             prect->bottom = wp.rcNormalPosition.bottom-wp.rcNormalPosition.top-
00539                 2*(GetSystemMetrics(SM_CYSIZEFRAME)+GetSystemMetrics(SM_CYEDGE))-
00540                 GetSystemMetrics(SM_CYCAPTION)-GetSystemMetrics(SM_CYMENUSIZE);
00541         }
00542     }

Here is the caller graph for this function:


Field Documentation

template<typename BASE>
ResizeManager ResizeController< BASE >::_resize_mgr [protected]

Definition at line 545 of file window.h.

Referenced by ResizeController< BASE >::WndProc().


The documentation for this struct was generated from the following file:
IBrowser Source Code Documentation
generated on 18.09.2008 by doxygen

Homepage