Property Sheet dialog. More...
#include <window.h>
Public Member Functions | |
PropertySheetDialog (HWND owner) | |
void | add (PropSheetPage &psp) |
int | DoModal (int start_page=0) |
HWND | GetCurrentPage () |
Protected Types | |
typedef vector< PROPSHEETPAGE > | Vector |
Protected Attributes | |
Vector | _pages |
HWND | _hwnd |
Property Sheet dialog.
Definition at line 407 of file window.h.
typedef vector<PROPSHEETPAGE> PropertySheetDialog::Vector [protected] |
PropertySheetDialog::PropertySheetDialog | ( | HWND | owner ) |
Definition at line 1319 of file window.cpp.
References ExplorerGlobals::_hInstance, and g_Globals.
: _hwnd(0) { PROPSHEETHEADER::dwSize = sizeof(PROPSHEETHEADER); PROPSHEETHEADER::dwFlags = PSH_PROPSHEETPAGE | PSH_MODELESS; PROPSHEETHEADER::hwndParent = owner; PROPSHEETHEADER::hInstance = g_Globals._hInstance; }
void PropertySheetDialog::add | ( | PropSheetPage & | psp ) |
Definition at line 1328 of file window.cpp.
References _pages.
Referenced by ExplorerPropertySheet().
{ _pages.push_back(psp); }
int PropertySheetDialog::DoModal | ( | int | start_page = 0 ) |
Definition at line 1333 of file window.cpp.
References _pages, Window::dispatch_dialog_msg(), HandleException(), HWND, Window::pretranslate_msg(), and PropSheet_GetResult.
Referenced by ExplorerPropertySheet().
{ PROPSHEETHEADER::ppsp = (LPCPROPSHEETPAGE) &_pages[0]; PROPSHEETHEADER::nPages = _pages.size(); PROPSHEETHEADER::nStartPage = start_page; /* Window* pwnd = Window::create_property_sheet(this, WINDOW_CREATOR(PropertySheetDlg), NULL); if (!pwnd) return -1; HWND hwndPropSheet = *pwnd; */ int ret = PropertySheet(this); if (ret == -1) return -1; HWND hwndPropSheet = (HWND) ret; HWND hwndparent = GetParent(hwndPropSheet); if (hwndparent) EnableWindow(hwndparent, FALSE); ret = 0; MSG msg; while(GetMessage(&msg, 0, 0, 0)) { try { if (Window::pretranslate_msg(&msg)) continue; if (PropSheet_IsDialogMessage(hwndPropSheet, &msg)) continue; if (Window::dispatch_dialog_msg(&msg)) continue; TranslateMessage(&msg); try { DispatchMessage(&msg); } catch(COMException& e) { HandleException(e, 0); } if (!PropSheet_GetCurrentPageHwnd(hwndPropSheet)) { ret = PropSheet_GetResult(hwndPropSheet); break; } } catch(COMException& e) { HandleException(e, 0); } } if (hwndparent) EnableWindow(hwndparent, TRUE); DestroyWindow(hwndPropSheet); return ret; }
HWND PropertySheetDialog::GetCurrentPage | ( | ) |
HWND PropertySheetDialog::_hwnd [protected] |
Definition at line 419 of file window.h.
Referenced by GetCurrentPage().
Vector PropertySheetDialog::_pages [protected] |
ROS Explorer Source Code Documentation
generated on 02.01.2013 by ![]() |