Public Member Functions | Protected Types | Protected Attributes

PropertySheetDialog Struct Reference

Property Sheet dialog. More...

#include <window.h>

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

List of all members.

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 407 of file window.h.


Member Typedef Documentation

typedef vector<PROPSHEETPAGE> PropertySheetDialog::Vector [protected]

Definition at line 417 of file window.h.


Constructor & Destructor Documentation

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;
}

Member Function Documentation

void PropertySheetDialog::add ( PropSheetPage psp )

Definition at line 1328 of file window.cpp.

References _pages.

Referenced by ExplorerPropertySheet().

{
    _pages.push_back(psp);
}

Here is the caller graph for this function:

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;
}

Here is the call graph for this function:

Here is the caller graph for this function:

HWND PropertySheetDialog::GetCurrentPage (  )

Definition at line 1394 of file window.cpp.

References _hwnd, and HWND.

{
    HWND hdlg = PropSheet_GetCurrentPageHwnd(_hwnd);
    return hdlg;
}

Member Data Documentation

Definition at line 419 of file window.h.

Referenced by GetCurrentPage().

Definition at line 418 of file window.h.

Referenced by add(), and DoModal().


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