ReactOS 0.4.15-dev-7953-g1f49173
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{
1327 PROPSHEETHEADER::dwSize = sizeof(PROPSHEETHEADER);
1328 PROPSHEETHEADER::dwFlags = PSH_PROPSHEETPAGE | PSH_MODELESS;
1329 PROPSHEETHEADER::hwndParent = owner;
1330 PROPSHEETHEADER::hInstance = g_Globals._hInstance;
1331}
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
#define PROPSHEETHEADER
Definition: prsht.h:392
#define PSH_MODELESS
Definition: prsht.h:50
#define PSH_PROPSHEETPAGE
Definition: prsht.h:43
HINSTANCE _hInstance
Definition: globals.h:270

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 {
1365 if (Window::pretranslate_msg(&msg))
1366 continue;
1367
1368 if (PropSheet_IsDialogMessage(hwndPropSheet, &msg))
1369 continue;
1370
1371 if (Window::dispatch_dialog_msg(&msg))
1372 continue;
1373
1375
1376 try {
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 msg(x)
Definition: auth_time.c:54
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static const WCHAR start_page[]
Definition: general.c:38
HANDLE HWND
Definition: compat.h:19
#define e
Definition: ke_i.h:82
static HWND hwndparent
Definition: listview.c:56
#define PropSheet_IsDialogMessage(d, m)
Definition: prsht.h:347
#define PropertySheet
Definition: prsht.h:400
#define LPCPROPSHEETPAGE
Definition: prsht.h:391
#define PropSheet_GetCurrentPageHwnd(d)
Definition: prsht.h:345
void HandleException(COMException &e, HWND hwnd)
Exception Handler for COM exceptions.
Exception with context information.
Definition: shellclasses.h:114
size_type size() const
Definition: _vector.h:192
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
int ret
#define PropSheet_GetResult(hDlg)
Definition: window.cpp:1320
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define GetMessage
Definition: winuser.h:5790
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HWND WINAPI GetParent(_In_ HWND)
#define DispatchMessage
Definition: winuser.h:5765
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by ExplorerPropertySheet().

◆ GetCurrentPage()

HWND PropertySheetDialog::GetCurrentPage ( )

Definition at line 1399 of file window.cpp.

1400{
1402 return hdlg;
1403}

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: