2020-07-10 09:43 AM - last edited on 2021-09-15 11:58 AM by Noemi Balogh
class placeEuroformDialog : public DG::ModalDialog, public DG::ButtonItemObserver, public DG::CompoundItemObserver { protected: enum Controls { ButtonID = 1, GroupboxID = 2, LeftTextID = 3, IntEditID = 4, PopupControlID = 5 }; DG::Button btn_OK; DG::Button btn_Cancel; DG::GroupBox grp_placeCnt; DG::GroupBox grp_euroformOptions; DG::LeftText lbl_horCnt; DG::LeftText lbl_verCnt; DG::LeftText lbl_wid; DG::LeftText lbl_hei; DG::LeftText lbl_ori; DG::LeftText lbl_inst; DG::IntEdit edt_horCnt; DG::IntEdit edt_verCnt; DG::PopUp popup_wid; DG::PopUp popup_hei; DG::PopUp popup_ori; DG::PopUp popup_inst; virtual void ButtonClicked (const DG::ButtonClickEvent& ev) override; public: placeEuroformDialog (); ~placeEuroformDialog (); }; placeEuroformDialog::placeEuroformDialog () : DG::ModalDialog (ACAPI_GetOwnResModule (), 32600, ACAPI_GetOwnResModule ()), btn_OK (GetReference (), ButtonID), btn_Cancel (GetReference (), ButtonID), grp_placeCnt (GetReference (), GroupboxID), grp_euroformOptions (GetReference (), GroupboxID), lbl_horCnt (GetReference (), LeftTextID), lbl_verCnt (GetReference (), LeftTextID), lbl_wid (GetReference (), LeftTextID), lbl_hei (GetReference (), LeftTextID), lbl_ori (GetReference (), LeftTextID), lbl_inst (GetReference (), LeftTextID), edt_horCnt (GetReference (), IntEditID), edt_verCnt (GetReference (), IntEditID), popup_wid (GetReference (), PopupControlID), popup_hei (GetReference (), PopupControlID), popup_ori (GetReference (), PopupControlID), popup_inst (GetReference (), PopupControlID) { AttachToAllItems (*this); } placeEuroformDialog::~placeEuroformDialog () { DetachFromAllItems (*this); } void placeEuroformDialog::ButtonClicked (const DG::ButtonClickEvent& ev) { ACAPI_WriteReport ("This message is show.", true); if (ev.GetSource () == &btn_OK) { ACAPI_WriteReport ("OK Button... This message is not show.", true); PostCloseRequest (Accept); } } ... GSErrCode placeEuroform (void) { placeEuroformDialog dialog; dialog.Invoke (); return NoError; } ... GSErrCode __ACENV_CALL MenuCommandHandler (const API_MenuParams *menuParams) { GSErrCode err = NoError; switch (menuParams->menuItemRef.menuResID) { case 32500: switch (menuParams->menuItemRef.itemIndex) { case 1: err = placeEuroform (); break; } break; } return err; } // CommandHandler ()
Solved! Go to Solution.
2020-07-11 12:44 PM
ButtonID = 1,
btn_OK (GetReference (), ButtonID), btn_Cancel (GetReference (), ButtonID),
2020-07-11 12:44 PM
ButtonID = 1,
btn_OK (GetReference (), ButtonID), btn_Cancel (GetReference (), ButtonID),
2020-07-13 02:31 AM