ReactOS  0.4.15-dev-1386-g5cb9f87
PropertySheetDialog Struct Reference

Property Sheet dialog. More...

#include <window.h>

Inheritance diagram for PropertySheetDialog:
Collaboration diagram for PropertySheetDialog:

Public Member Functions

 PropertySheetDialog (HWND owner)
 
void add (PropSheetPage &psp)
 
int DoModal (int start_page=0)
 
HWND GetCurrentPage ()
 

Protected Types

typedef vector< PROPSHEETPAGEVector
 

Protected Attributes

Vector _pages
 
HWND _hwnd
 

Detailed Description

Property Sheet dialog.

Definition at line 408 of file window.h.

Member Typedef Documentation

◆ Vector

Definition at line 418 of file window.h.

Constructor & Destructor Documentation

◆ PropertySheetDialog()

PropertySheetDialog::PropertySheetDialog ( HWND  owner)

Definition at line 1324 of file window.cpp.

1325  : _hwnd(0)
1326 {
1331 }
#define PSH_MODELESS
Definition: prsht.h:50
HINSTANCE hInstance
Definition: charmap.c:20
#define PROPSHEETHEADER
Definition: prsht.h:392
static HWND hwndParent
Definition: cryptui.c:300
HINSTANCE _hInstance
Definition: globals.h:270
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
#define PSH_PROPSHEETPAGE
Definition: prsht.h:43
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54

Member Function Documentation

◆ add()

void PropertySheetDialog::add ( PropSheetPage psp)

Definition at line 1333 of file window.cpp.

1334 {
1335  _pages.push_back(psp);
1336 }
void push_back(const _Tp &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp))
Definition: _vector.h:379

Referenced by ExplorerPropertySheet().

◆ DoModal()

int PropertySheetDialog::DoModal ( int  start_page = 0)

Definition at line 1338 of file window.cpp.

1339 {
1340  PROPSHEETHEADER::ppsp = (LPCPROPSHEETPAGE) &_pages[0];
1341  PROPSHEETHEADER::nPages = _pages.size();
1342  PROPSHEETHEADER::nStartPage = start_page;
1343 /*
1344  Window* pwnd = Window::create_property_sheet(this, WINDOW_CREATOR(PropertySheetDlg), NULL);
1345  if (!pwnd)
1346  return -1;
1347 
1348  HWND hwndPropSheet = *pwnd;
1349 */
1350  int ret = PropertySheet(this);
1351  if (ret == -1)
1352  return -1;
1353 
1354  HWND hwndPropSheet = (HWND) ret;
1355  HWND hwndparent = GetParent(hwndPropSheet);
1356 
1357  if (hwndparent)
1359 
1360  ret = 0;
1361  MSG msg;
1362 
1363  while(GetMessage(&msg, 0, 0, 0)) {
1364  try {
1366  continue;
1367 
1368  if (PropSheet_IsDialogMessage(hwndPropSheet, &msg))
1369  continue;
1370 
1372  continue;
1373 
1375 
1376  try {
1377  DispatchMessage(&msg);
1378  } catch(COMException& e) {
1379  HandleException(e, 0);
1380  }
1381 
1382  if (!PropSheet_GetCurrentPageHwnd(hwndPropSheet)) {
1383  ret = PropSheet_GetResult(hwndPropSheet);
1384  break;
1385  }
1386  } catch(COMException& e) {
1387  HandleException(e, 0);
1388  }
1389  }
1390 
1391  if (hwndparent)
1393 
1394  DestroyWindow(hwndPropSheet);
1395 
1396  return ret;
1397 }
#define DispatchMessage
Definition: winuser.h:5740
BOOL WINAPI TranslateMessage(_In_ const MSG *)
static HWND hwndparent
Definition: listview.c:56
#define PropSheet_IsDialogMessage(d, m)
Definition: prsht.h:347
#define PropSheet_GetCurrentPageHwnd(d)
Definition: prsht.h:345
#define TRUE
Definition: types.h:120
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
HANDLE HWND
Definition: compat.h:19
BOOL WINAPI DestroyWindow(_In_ HWND)
Exception with context information.
Definition: shellclasses.h:113
#define FALSE
Definition: types.h:117
#define e
Definition: ke_i.h:82
static const WCHAR start_page[]
Definition: general.c:38
void HandleException(COMException &e, HWND hwnd)
Exception Handler for COM exceptions.
static BOOL pretranslate_msg(LPMSG pmsg)
Definition: window.cpp:589
#define LPCPROPSHEETPAGE
Definition: prsht.h:391
int ret
#define PropSheet_GetResult(hDlg)
Definition: window.cpp:1320
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HWND WINAPI GetParent(_In_ HWND)
#define GetMessage
Definition: winuser.h:5765
#define msg(x)
Definition: auth_time.c:54
#define PropertySheet
Definition: prsht.h:400
size_type size() const
Definition: _vector.h:192
static BOOL dispatch_dialog_msg(LPMSG pmsg)
Definition: window.cpp:619

Referenced by ExplorerPropertySheet().

◆ GetCurrentPage()

HWND PropertySheetDialog::GetCurrentPage ( )

Definition at line 1399 of file window.cpp.

1400 {
1402  return hdlg;
1403 }
#define PropSheet_GetCurrentPageHwnd(d)
Definition: prsht.h:345

Member Data Documentation

◆ _hwnd

HWND PropertySheetDialog::_hwnd
protected

Definition at line 420 of file window.h.

Referenced by GetCurrentPage().

◆ _pages

Vector PropertySheetDialog::_pages
protected

Definition at line 419 of file window.h.

Referenced by add(), and DoModal().


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