Second constructor for zFormDialog

Article ID: 875
Last updated: 05 Feb, 2008
Article ID: 875
Last updated: 05 Feb, 2008
Revision: 1
Views: 2496
Posted: 02 Sep, 1997
by Dean J.
Updated: 05 Feb, 2008
by Dean J.
Problem


The second constructor mentioned in the programmer's reference is actually missing in the code.



Action


The implementation for the second zFormDialog ctor mentioned in the Programmer's Reference (pg.268) is missing from the formdlg.cpp file.

All you need to do is add the body for the ctor below:

zFormDialog::zFormDialog(zWindow *parent_ ,zSizer* sizer_ ,unsigned long style_, const char* title_)
 :zDialogFrame(parent_, sizer_, style_, title_) {
   ziSetType(ZTYP_zFormDialog);
 _flags = 0;
 _completed = 0;
   zPushButton *p = (zPushButton*)get(IDOK);
 if (p)
  p->setCommand(this, (NotifyProc)&zFormDialog::endOk);
 if ((p = (zPushButton*)get(IDCANCEL))!=0)
  p->setCommand(this, (NotifyProc)&zFormDialog::endCancel);
}
 

Make sure that you do a show() before a modal() call (calling modal() is optional).

This article was:   Helpful | Not helpful
Report an issue
Article ID: 875
Last updated: 05 Feb, 2008
Revision: 1
Views: 2496
Posted: 02 Sep, 1997 by Dean J.
Updated: 05 Feb, 2008 by Dean J.

Others in this category