#include <mi32/cformdlg.h>
Public Member Functions | |
| CFORMDLG () | |
| int | Create (Widget parent, char *title, char *help, BUTTONITEM *buttons=NULL, UINT32 flags=0) |
| int | Create (Widget parent, const char *title, const char *help, BUTTONITEM *buttons=NULL, UINT32 flags=0) |
| virtual int | DoModal () |
| void | EndDialog (int result=0) |
| Widget | GetCancelButton () const |
| Widget | GetMainForm () const |
| Widget | GetOKButton () const |
| virtual bool | IsModal () const |
| void | OKButtonDisable () const |
| void | OKButtonEnable (bool enable=true) const |
| virtual void | OnCancel () |
| virtual void | OnClose () |
| virtual int | OnInitDialog (Widget form)=0 |
| virtual void | OnOK () |
| virtual | ~CFORMDLG () |
Definition at line 43 of file cformdlg.h.
| CFORMDLG::CFORMDLG | ( | ) |
CONSTRUCTOR.
| virtual CFORMDLG::~CFORMDLG | ( | ) | [virtual] |
DESTRUCTOR.
| int CFORMDLG::Create | ( | Widget | parent, | |
| char * | title, | |||
| char * | help, | |||
| BUTTONITEM * | buttons = NULL, |
|||
| UINT32 | flags = 0 | |||
| ) |
For backwards comapt. Should go away...
| parent | Parent widget for dialog |
| title | title string (localized via tntxres.txt) |
| help | help tag |
| buttons | Buttons for bottom of window. NULL to use default ok/cancel/help |
| int CFORMDLG::Create | ( | Widget | parent, | |
| const char * | title, | |||
| const char * | help, | |||
| BUTTONITEM * | buttons = NULL, |
|||
| UINT32 | flags = 0 | |||
| ) |
Create the dialog.
Returns 0 or an error code. If you don't want a button row at the bottom, pass in a BUTTONITEM array in which the first item has a NULL label.
| parent | Parent widget for dialog |
| title | title string (localized via tntxres.txt) |
| help | help tag |
| buttons | Buttons for bottom of window. NULL to use default ok/cancel/help |
| virtual int CFORMDLG::DoModal | ( | ) | [virtual] |
Manage dialog and wait for it to close.
Returns 0 or EUserCancel I made this virtual because the MFC one is. I'm not sure why you'd want to override it, but you can.
| void CFORMDLG::EndDialog | ( | int | result = 0 |
) |
| Widget CFORMDLG::GetCancelButton | ( | ) | const [inline] |
| Widget CFORMDLG::GetMainForm | ( | ) | const [inline] |
| Widget CFORMDLG::GetOKButton | ( | ) | const [inline] |
| virtual bool CFORMDLG::IsModal | ( | ) | const [inline, virtual] |
Function to determine if the dialog is modal or not.
Default is modal. If you want your derived class to be a non-modal dialog, override this function and have it return false.
Definition at line 109 of file cformdlg.h.
| void CFORMDLG::OKButtonDisable | ( | ) | const [inline] |
| void CFORMDLG::OKButtonEnable | ( | bool | enable = true |
) | const |
Enable (or disable) the OK button, if any.
Default is to enable, but takes an optional parameter which could be the result of an expression. true enables, false disables. Doesn't actually modify the class, just a Widget it holds.
| virtual void CFORMDLG::OnCancel | ( | ) | [virtual] |
Called when user hits Cancel (if you used default buttons) or the "X" on title bar.
Default calls EndDialog(EUserCancel). If you override it, your version should call DFORMDLG::OnCancel().
| virtual void CFORMDLG::OnClose | ( | ) | [virtual] |
Called when dialog pops down.
Default does nothing.
| virtual int CFORMDLG::OnInitDialog | ( | Widget | form | ) | [pure virtual] |
Function called by Create to create the contents.
Derived class MUST implement this. Function should return 0 or an error code. If returns < 0, create will return the error value too. The form passed in is already attached to the dialog on top, left and right, and to a separator above the button row on bottom
| form | For to create contents in |
| virtual void CFORMDLG::OnOK | ( | ) | [virtual] |
Called when user hits OK (if you used default buttons).
Default calls EndDialog(0). If you override it, your version should call DFORMDLG::OnOK().
1.5.2