Public Types | Public Member Functions | Protected Attributes

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]

List of all members.

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 514 of file window.h.


Member Typedef Documentation

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

Reimplemented in FindProgramDlg, MdiSdiDlg, and TrayNotifyDlg.

Definition at line 516 of file window.h.


Constructor & Destructor Documentation

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

Definition at line 518 of file window.h.

     :  super(hwnd),
        _resize_mgr(hwnd)
    {
    }

Member Function Documentation

template<typename BASE>
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);
        }
    }

Here is the caller graph for this function:

template<typename BASE>
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);
        }
    }

Here is the caller graph for this function:


Member Data Documentation

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

Definition at line 562 of file window.h.

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


The documentation for this struct was generated from the following file:

ROS Explorer Source Code Documentation
generated on 02.01.2013 by doxygen

ROS Explorer Homepage