2009-02-09 10:44 AM - last edited on 2023-08-03 05:24 PM by Doreena Deng
'GDLG' 4000 Modal 100 100 100 100 "Test Window" { TextEdit 20 20 60 20 SmallPlain 255 }- In cpp file :
DG::ModalDialog* modalWindow = new DG::ModalDialog(4000); if(!modalWindow->Invoke()) ACAPI_WriteReport("Invoke failed",true);But the invoke always failed.
2009-02-09 01:20 PM
atila-diffusion wrote:Your resource IDs should start from 32500 (except for palettes and modeless dialogs, which start from 32400).
i'm trying to use modalDialog class so as to have a window with a textEdit, a label and two button( cancel and ok).
But the invoke always failed.
May be my grc file is not correctly written, i don't know.
2009-02-09 02:08 PM
DG::ModalDialog* modalWindow = new DG::ModalDialog(32520); modalWindow->Invoke();
DGModalDialog (Fill_GDLGID, Fill_Handler, (DGUserData) &prefsData)like in the exemple ???
2009-02-09 02:41 PM
atila-diffusion wrote:Check that your resources compiled with the new ID too.
I changed my ressourceId to 32520 but the invoke failed again.
Is it better to use this fonction :
ModalDialog
or this fonction :
DGModalDialog
like in the exemple ???
Dialog about(aboutResID); about.show();
2009-02-09 02:52 PM
2009-02-10 03:33 PM
'GDLG' 32500 Modal 0 0 420 460 "Window test" { /* [ 1] */ Button 340 425 70 20 LargePlain "OK" /* [ 2] */ Button 260 425 70 20 LargePlain "Cancel" /* [ 3] */ TextEdit 8 4 250 20 SmallPlain 30 }
static short DGCALLBACK myWindow_Handler (short message, short dialogID, short item, DGUserData userData, DGMessageData msgData) { msgData = msgData; userData = userData; item = item; dialogID = dialogID; switch (message) { case DG_MSG_INIT: break; case DG_MSG_CLICK: if(item == 1) ACAPI_WriteReport("OK",true); break; case DG_MSG_CLOSE: break; } return 1; } // Fill_Handler static void Do_myWindow (void) { GSResModule filNum; // Get the dialog from our resource file filNum = ACAPI_UseOwnResModule (); DGModalDialog (32500, myWindow_Handler,0); ACAPI_ResetResModule (filNum); } // Do_FillSettingsThanks
2009-02-16 11:11 AM
case DG_MSG_FILTERCHAR: test[0] = char(msgData); test[1] = '\0'; strcat(contentKeyValidation,test); DGSetItemText (32509, 2, contentKeyValidation); break;:::::::::::::::::::END EDIT :::::::::::::::::::
2009-02-17 03:27 PM
2009-02-17 09:11 PM
2009-02-18 06:05 AM