The class Dialog implements modal dialogs. More...
#include <window.h>
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) |
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.
typedef Window Dialog::super |
Dialog::Dialog | ( | HWND | hwnd ) |
Definition at line 685 of file window.cpp.
References Window::register_dialog().
: super(hwnd) { register_dialog(hwnd); }
Dialog::~Dialog | ( | ) |
Definition at line 691 of file window.cpp.
References WindowHandle::_hwnd, and Window::unregister_dialog().
{ unregister_dialog(_hwnd); }
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; }
int Dialog::DoModal | ( | UINT | nid, |
CREATORFUNC_INFO | creator, | ||
const void * | info, | ||
HWND | hwndParent = 0 |
||
) | [static] |
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*/); }
int Dialog::DoModal | ( | UINT | nid, |
CREATORFUNC | creator, | ||
HWND | hwndParent = 0 |
||
) | [static] |
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*/); }
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 }
ROS Explorer Source Code Documentation
generated on 02.01.2013 by ![]() |