#include "diawxxt.h" class ERROR_FORM: public MAINFORM{ /*~PROTOBEG~ ERROR_FORM */ public: ERROR_FORM (const char *tb[]); /*~PROTOEND~ ERROR_FORM */ }; static void button_func (wxObject &o, wxCommandEvent &) { wxButton *b = (wxButton*)&o; MFORM *p = (ERROR_FORM*)b->GetParent(); p->gettop()->dispose(); } PUBLIC ERROR_FORM::ERROR_FORM ( const char *tb[]) : MAINFORM ("") { for (int i=0; tb[i] != NULL; i++){ New_label (tb[i]); Newline(); } MFORM *f = New_form(""); f->Fill(); MFORM_C *m = f->alloc_mf(); wxButton *ret = new wxButton(f,button_func,"Dismiss"); m->c = ret; m->type = T_BUTTON; f->Fill(); } wxFrame *error (const char *tb[]) { ERROR_FORM *ef = new ERROR_FORM (tb); ef->Popup(); return ef->getframe(); }