MWidgets::Dialog Class Reference

Class that represent modal dialog window. More...

#include <dialog.h>

Inheritance diagram for MWidgets::Dialog:

MWidgets::Widget List of all members.

Public Member Functions

 Dialog ()
 Constructor.
virtual void Create (int w, int h, string caption)
 Create widgets window.
int DoModal (Widget *parent)
 Show dialog box and disable parent window.
void EndDlg (int val)
 Close dialog box.
virtual WIDGET_TYPE GetType ()
 Returns class's identifier like WINDOW or BUTTON.

Protected Member Functions

virtual LRESULT OnMessage (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 Subclassing for override wm_close.

Protected Attributes

int m_iResult
 Value returned by DoModal, and initialize by EndDlg.
bool m_bShow
 Value controls message loop in DoModal function.

Detailed Description

Class that represent modal dialog window.

Definition at line 14 of file dialog.h.


Constructor & Destructor Documentation

MWidgets::Dialog::Dialog (  ) 

Constructor.

Definition at line 18 of file dialog.cpp.

References m_bShow, and m_iResult.


Member Function Documentation

void MWidgets::Dialog::Create ( int  w,
int  h,
string  caption 
) [virtual]

Create widgets window.

Parameters:
w new widget's width.
h new widget's height.
caption new widget's caption.

Definition at line 24 of file dialog.cpp.

References MWidgets::Widget::Create(), m_bShow, and m_iResult.

int MWidgets::Dialog::DoModal ( Widget parent  ) 

Show dialog box and disable parent window.

Returns:
values such as IDOK.

Definition at line 43 of file dialog.cpp.

References MWidgets::Widget::GetHwnd(), MWidgets::Widget::Hide(), m_bShow, MWidgets::Widget::m_hWnd, m_iResult, and MWidgets::Widget::Show().

void MWidgets::Dialog::EndDlg ( int  val  ) 

Close dialog box.

Parameters:
val value returned by DoModal.

Definition at line 72 of file dialog.cpp.

References m_bShow, and m_iResult.

WIDGET_TYPE MWidgets::Dialog::GetType (  )  [virtual]

Returns class's identifier like WINDOW or BUTTON.

Implements MWidgets::Widget.

Definition at line 78 of file dialog.cpp.

References MWidgets::DIALOG.

LRESULT MWidgets::Dialog::OnMessage ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
) [protected, virtual]

Subclassing for override wm_close.

Reimplemented from MWidgets::Widget.

Definition at line 31 of file dialog.cpp.

References m_bShow, m_iResult, and MWidgets::Widget::OnMessage().


Member Data Documentation

bool MWidgets::Dialog::m_bShow [protected]

Value controls message loop in DoModal function.

Definition at line 22 of file dialog.h.

Referenced by Create(), Dialog(), DoModal(), EndDlg(), and OnMessage().

int MWidgets::Dialog::m_iResult [protected]

Value returned by DoModal, and initialize by EndDlg.

Definition at line 20 of file dialog.h.

Referenced by Create(), Dialog(), DoModal(), EndDlg(), and OnMessage().


The documentation for this class was generated from the following files:
Generated on Thu Oct 26 13:47:46 2006 for MWidgets by  doxygen 1.4.7