Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions

Dialog Struct Reference

The class Dialog implements modal dialogs. More...

#include <window.h>

Inheritance diagram for Dialog:
Inheritance graph
[legend]
Collaboration diagram for Dialog:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Window super

Public Member Functions

 Dialog (HWND)
 ~Dialog ()

Static Public Member Functions

static int DoModal (UINT nid, CREATORFUNC creator, HWND hwndParent=0)
static int DoModal (UINT nid, CREATORFUNC_INFO creator, const void *info, HWND hwndParent=0)

Protected Member Functions

LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
int Command (int id, int code)

Detailed Description

The class Dialog implements modal dialogs.

A Dialog object should be constructed by calling Dialog::DoModal() and specifying the class using the WINDOW_CREATOR() macro.

Definition at line 370 of file window.h.


Member Typedef Documentation


Constructor & Destructor Documentation

Dialog::Dialog ( HWND  hwnd )

Definition at line 685 of file window.cpp.

References Window::register_dialog().

 :  super(hwnd)
{
    register_dialog(hwnd);
}

Here is the call graph for this function:

Dialog::~Dialog (  )

Definition at line 691 of file window.cpp.

References WindowHandle::_hwnd, and Window::unregister_dialog().

Here is the call graph for this function:


Member Function Documentation

int Dialog::Command ( int  id,
int  code 
) [protected, virtual]

Reimplemented from Window.

Reimplemented in FindProgramDlg, DesktopSettingsDlg, TaskbarSettingsDlg, StartmenuSettingsDlg, MdiSdiDlg, TrayNotifyDlg, and PropSheetPageDlg.

Definition at line 760 of file window.cpp.

References WindowHandle::_hwnd.

Referenced by FindProgramDlg::Command().

{
    if (code == BN_CLICKED) {
        EndDialog(_hwnd, id);
        return 0;   // message has been processed
    }

    return 1;
}

Here is the caller graph for this function:

int Dialog::DoModal ( UINT  nid,
CREATORFUNC_INFO  creator,
const void *  info,
HWND  hwndParent = 0 
) [static]

Todo:
call Window::pretranslate_msg()

Definition at line 708 of file window.cpp.

References ExplorerGlobals::_hInstance, Window::DialogProc(), g_Globals, Window::GetStaticWindowData(), Window::s_new_info, and Window::s_window_creator.

{
    Lock lock(GetStaticWindowData()._create_crit_sect); // protect access to s_window_creator and s_new_info

    s_window_creator = (CREATORFUNC) creator;
    s_new_info = NULL;

    ///@todo call Window::pretranslate_msg()

    return DialogBoxParam(g_Globals._hInstance, MAKEINTRESOURCE(nid), hwndParent, DialogProc, 0/*lpParam*/);
}

Here is the call graph for this function:

int Dialog::DoModal ( UINT  nid,
CREATORFUNC  creator,
HWND  hwndParent = 0 
) [static]

Todo:
call Window::pretranslate_msg()

Definition at line 696 of file window.cpp.

References ExplorerGlobals::_hInstance, Window::DialogProc(), g_Globals, Window::GetStaticWindowData(), Window::s_new_info, and Window::s_window_creator.

Referenced by NotifyArea::Command(), StartMenuHandler::Command(), TaskbarSettingsDlg::Command(), MainFrameBase::Command(), explorer_about(), and explorer_show_frame().

{
    Lock lock(GetStaticWindowData()._create_crit_sect); // protect access to s_window_creator and s_new_info

    s_window_creator = creator;
    s_new_info = NULL;

    ///@todo call Window::pretranslate_msg()

    return DialogBoxParam(g_Globals._hInstance, MAKEINTRESOURCE(nid), hwndParent, DialogProc, 0/*lpParam*/);
}

Here is the call graph for this function:

Here is the caller graph for this function:

LRESULT Dialog::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
) [protected, virtual]

Reimplemented from Window.

Reimplemented in ExplorerAboutDlg, FindProgramDlg, TrayNotifyDlg, ResizeController< Dialog >, CtlColorParent< OwnerDrawParent< Dialog > >, OwnerDrawParent< PropSheetPageDlg >, and OwnerDrawParent< Dialog >.

Definition at line 755 of file window.cpp.

Referenced by PropSheetPageDlg::DialogProc().

{
    return FALSE;   // message has not been processed
}

Here is the caller graph for this function:


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

ROS Explorer Source Code Documentation
generated on 02.01.2013 by doxygen

ROS Explorer Homepage