Classes | Defines | Typedefs | Enumerations | Functions

window.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ChildWndInfo
 information structure for creation of a MDI child window More...
struct  Window
 Class Window is the base class for several C++ window wrapper classes. More...
struct  Window::StaticWindowData
 structure for managing critical sections as static class information in struct Window More...
struct  TypeCheck< CLASS >
 dynamic casting of Window pointers More...
struct  SubclassedWindow
 SubclassedWindow is used to wrap already existing window handles into C++ Window objects. More...
struct  WindowCreator< WND_CLASS >
 template class used in macro WINDOW_CREATOR to define the creater functions for Window objects More...
struct  WindowCreatorInfo< WND_CLASS, INFO_CLASS >
 template class used in macro WINDOW_CREATOR_INFO to the define creater functions for Window objects with additional creation information More...
struct  WindowClass
 WindowClass is a neat wrapper for RegisterClassEx(). More...
struct  BtnWindowClass
 window class with gray background color More...
struct  IconWindowClass
 window class with specified icon from resources More...
struct  MenuInfo
 menu info structure More...
struct  ChildWindow
 Class ChildWindow represents MDI child windows. More...
struct  PreTranslateWindow
 PreTranslateWindow is used to register windows to be called by Window::pretranslate_msg(). More...
struct  DialogWindow
 The class DialogWindow implements modeless dialogs, which are managed by Window::dispatch_dialog_msg() in Window::MessageLoop(). More...
struct  Dialog
 The class Dialog implements modal dialogs. More...
struct  PropSheetPage
struct  PropertySheetDialog
 Property Sheet dialog. More...
struct  PropSheetPageDlg
 Property Sheet Page (inner dialog) More...
struct  ResizeEntry
 structure to assign RESIZE_FLAGS to dialogs control More...
struct  ResizeManager
 Management of controls in resizable dialogs. More...
struct  ResizeController< BASE >
 Controller base template class for resizable dialogs. More...
struct  Button
 This class constructs button controls. More...
struct  Static
 This class constructs static controls. More...
struct  CtlColorParent< BASE >
struct  OwnerDrawParent< BASE >
 draw message routing for ColorButton and PictureButton More...
struct  OwnerdrawnButton
 Subclass button controls to draw them by using PM_DISPATCH_DRAWITEM The owning window should use the OwnerDrawParent template to route owner draw messages to the buttons. More...
struct  FlatButton
 Subclass button controls to paint colored text labels. More...
struct  PictureButton
 Subclass button controls to paint pictures left to the labels. More...
struct  ColorStatic
struct  HyperlinkCtrl
 Hyperlink Controls. More...
struct  ToolTip
 encapsulation of tool tip controls More...
struct  ListSort
 sorting of list controls More...
struct  TrayIcon
struct  TrayIconControllerTemplate< BASE >
struct  EditController

Defines

#define GET_WINDOW(CLASS, hwnd)   Window::get_window<CLASS>(hwnd)
#define NFR_CURRENT   NFR_ANSI
#define WINDOW_DYNAMIC_CAST(CLASS, hwnd)   TypeCheck<CLASS>::dyn_cast(Window::get_window(hwnd))
#define WINDOW_CREATOR(WND_CLASS)   ((Window::CREATORFUNC) WindowCreator<WND_CLASS>::window_creator)
#define WINDOW_CREATOR_INFO(WND_CLASS, INFO_CLASS)   ((Window::CREATORFUNC_INFO) WindowCreatorInfo<WND_CLASS, INFO_CLASS>::window_creator)
#define PM_DISPATCH_COMMAND   (WM_APP+0x00)
#define PM_TRANSLATE_MSG   (WM_APP+0x01)
#define SPLIT_WIDTH   5
#define DEFAULT_SPLIT_POS   300
#define COLOR_SPLITBAR   LTGRAY_BRUSH
#define PM_FRM_GET_MENUINFO   (WM_APP+0x02)
#define Frame_GetMenuInfo(hwnd)   ((MenuInfo*)SNDMSG(hwnd, PM_FRM_GET_MENUINFO, 0, 0))
#define PM_SETSTATUSTEXT   (WM_APP+0x1E)
#define PM_FRM_CALC_CLIENT   (WM_APP+0x03)
#define Frame_CalcFrameClient(hwnd, prt)   ((BOOL)SNDMSG(hwnd, PM_FRM_CALC_CLIENT, 0, (LPARAM)(PRECT)prt))
#define PM_JUMP_TO_URL   (WM_APP+0x25)
#define PM_URL_CHANGED   (WM_APP+0x26)
#define PM_DISPATCH_CTLCOLOR   (WM_APP+0x08)
#define PM_DISPATCH_DRAWITEM   (WM_APP+0x09)
#define PM_TRAYICON   (WM_APP+0x20)
#define WINMSG_TASKBARCREATED   TEXT("TaskbarCreated")
#define WINMSG_SHELLHOOK   TEXT("SHELLHOOK")

Typedefs

typedef set< HWNDWindowSet

Enumerations

enum  RESIZE_FLAGS {
  MOVE_LEFT = 0x1, MOVE_RIGHT = 0x2, MOVE_TOP = 0x4, MOVE_BOTTOM = 0x8,
  MOVE_X = MOVE_LEFT | MOVE_RIGHT, MOVE_Y = MOVE_TOP | MOVE_BOTTOM, RESIZE_X = MOVE_RIGHT, RESIZE_Y = MOVE_BOTTOM,
  MOVE = MOVE_X | MOVE_Y, RESIZE = RESIZE_X | RESIZE_Y
}
 

Flags to specify how to move and resize controls when resizing their parent window.

More...
enum  { TRAYBUTTON_LEFT = 0, TRAYBUTTON_RIGHT, TRAYBUTTON_MIDDLE }

Functions

void DrawGrayText (HDC hdc, LPRECT pRect, LPCTSTR text, int dt_flags)
int ListView_GetItemData (HWND list_ctrl, int idx)
int ListView_FindItemPara (HWND list_ctrl, LPARAM param)
int ListView_GetFocusedItem (HWND list_ctrl)
LPARAM TreeView_GetItemData (HWND hwndTreeView, HTREEITEM hItem)

Define Documentation

#define COLOR_SPLITBAR   LTGRAY_BRUSH

Definition at line 271 of file window.h.

Referenced by ChildWindow::WndProc(), and SDIMainFrame::WndProc().

#define DEFAULT_SPLIT_POS   300
#define Frame_CalcFrameClient (   hwnd,
  prt 
)    ((BOOL)SNDMSG(hwnd, PM_FRM_CALC_CLIENT, 0, (LPARAM)(PRECT)prt))

Definition at line 387 of file window.h.

Referenced by MainFrameBase::fullscreen_move(), and MainFrameBase::toggle_fullscreen().

#define Frame_GetMenuInfo (   hwnd )    ((MenuInfo*)SNDMSG(hwnd, PM_FRM_GET_MENUINFO, 0, 0))

Definition at line 282 of file window.h.

Referenced by Pane::command().

#define GET_WINDOW (   CLASS,
  hwnd 
)    Window::get_window<CLASS>(hwnd)
#define NFR_CURRENT   NFR_ANSI
#define PM_DISPATCH_COMMAND   (WM_APP+0x00)
#define PM_DISPATCH_CTLCOLOR   (WM_APP+0x08)
#define PM_DISPATCH_DRAWITEM   (WM_APP+0x09)

Definition at line 620 of file window.h.

Referenced by OwnerDrawParent< Dialog >::WndProc(), and OwnerdrawnButton::WndProc().

#define PM_FRM_CALC_CLIENT   (WM_APP+0x03)

Definition at line 386 of file window.h.

Referenced by MainFrameBase::ProcessMessage(), and ResizeController< Dialog >::WndProc().

#define PM_FRM_GET_MENUINFO   (WM_APP+0x02)

Definition at line 280 of file window.h.

Referenced by MainFrameBase::ProcessMessage().

#define PM_JUMP_TO_URL   (WM_APP+0x25)

Definition at line 389 of file window.h.

Referenced by MDIMainFrame::go_to(), and ChildWindow::WndProc().

#define PM_SETSTATUSTEXT   (WM_APP+0x1E)
#define PM_TRANSLATE_MSG   (WM_APP+0x01)
#define PM_TRAYICON   (WM_APP+0x20)

Definition at line 983 of file window.h.

Referenced by TrayIcon::Set(), and TrayIconControllerTemplate< BASE >::WndProc().

#define PM_URL_CHANGED   (WM_APP+0x26)
#define SPLIT_WIDTH   5
#define WINDOW_CREATOR (   WND_CLASS )    ((Window::CREATORFUNC) WindowCreator<WND_CLASS>::window_creator)
#define WINDOW_CREATOR_INFO (   WND_CLASS,
  INFO_CLASS 
)    ((Window::CREATORFUNC_INFO) WindowCreatorInfo<WND_CLASS, INFO_CLASS>::window_creator)
#define WINDOW_DYNAMIC_CAST (   CLASS,
  hwnd 
)    TypeCheck<CLASS>::dyn_cast(Window::get_window(hwnd))

Definition at line 166 of file window.h.

Referenced by StartMenuRoot::TrackStartmenu().

#define WINMSG_SHELLHOOK   TEXT("SHELLHOOK")

Definition at line 987 of file window.h.

#define WINMSG_TASKBARCREATED   TEXT("TaskbarCreated")

Definition at line 985 of file window.h.


Typedef Documentation

typedef set<HWND> WindowSet

Definition at line 29 of file window.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
TRAYBUTTON_LEFT 
TRAYBUTTON_RIGHT 
TRAYBUTTON_MIDDLE 

Definition at line 981 of file window.h.

Flags to specify how to move and resize controls when resizing their parent window.

Enumerator:
MOVE_LEFT 
MOVE_RIGHT 
MOVE_TOP 
MOVE_BOTTOM 
MOVE_X 
MOVE_Y 
RESIZE_X 
RESIZE_Y 
MOVE 
RESIZE 

Definition at line 454 of file window.h.


Function Documentation

void DrawGrayText ( HDC  hdc,
LPRECT  pRect,
LPCTSTR  text,
int  dt_flags 
)

Definition at line 886 of file window.cpp.

Referenced by PictureButton::DrawItem().

{
    COLORREF gray = GetSysColor(COLOR_GRAYTEXT);

    if (gray) {
        TextColor lcColor(hdc, GetSysColor(COLOR_BTNHIGHLIGHT));
        RECT shadowRect = {pRect->left+1, pRect->top+1, pRect->right+1, pRect->bottom+1};
        DrawText(hdc, title, -1, &shadowRect, dt_flags);

        SetTextColor(hdc, gray);
        DrawText(hdc, title, -1, pRect, dt_flags);
    } else {
        int old_r = pRect->right;
        int old_b = pRect->bottom;

        DrawText(hdc, title, -1, pRect, dt_flags|DT_CALCRECT);

        int x = pRect->left + (old_r-pRect->right)/2;
        int y = pRect->top + (old_b-pRect->bottom)/2;
        int w = pRect->right-pRect->left;
        int h = pRect->bottom-pRect->top;
        s_MyDrawText_Rect.right = w;
        s_MyDrawText_Rect.bottom = h;

        GrayString(hdc, GetSysColorBrush(COLOR_GRAYTEXT), MyDrawText, (LPARAM)title, -1, x, y, w, h);
    }
}

Here is the caller graph for this function:

int ListView_FindItemPara ( HWND  list_ctrl,
LPARAM  param 
) [inline]

Definition at line 927 of file window.h.

Referenced by ListSort::sort().

{
    LVFINDINFO fi;

    fi.flags = LVFI_PARAM;
    fi.lParam = param;

    return ListView_FindItem(list_ctrl, (unsigned)-1, &fi);
}

Here is the caller graph for this function:

int ListView_GetFocusedItem ( HWND  list_ctrl ) [inline]

Definition at line 937 of file window.h.

{
    int idx = ListView_GetItemCount(list_ctrl);

    while(--idx >= 0)
        if (ListView_GetItemState(list_ctrl, idx, LVIS_FOCUSED))
            break;

    return idx;
}
int ListView_GetItemData ( HWND  list_ctrl,
int  idx 
) [inline]

Definition at line 914 of file window.h.

Referenced by FindProgramDlg::LaunchSelected(), and ListSort::sort().

{
    LV_ITEM item;

    item.mask = LVIF_PARAM;
    item.iItem = idx;

    if (!ListView_GetItem(list_ctrl, &item))
        return 0;

    return item.lParam;
}

Here is the caller graph for this function:

LPARAM TreeView_GetItemData ( HWND  hwndTreeView,
HTREEITEM  hItem 
) [inline]

Definition at line 967 of file window.h.

Referenced by MainFrameBase::Notify(), ShellBrowser::OnDefaultCommand(), ShellBrowser::OnTreeItemExpanding(), ShellBrowser::OnTreeItemRClick(), ShellBrowser::select_entry(), ShellBrowser::select_folder(), and TrayNotifyDlg::SetIconMode().

{
    TVITEM tvItem;

    tvItem.mask = TVIF_PARAM;
    tvItem.hItem = hItem;

    if (!TreeView_GetItem(hwndTreeView, &tvItem))
        return 0;

    return tvItem.lParam;
}

Here is the caller graph for this function:


ROS Explorer Source Code Documentation
generated on 02.01.2013 by doxygen

ROS Explorer Homepage