Skip to main content
1-Visitor
Dec 26, 2019 6:36 AM UTC
Question

creating a creo ui

hi, 

i want to create an ui in creo window for which iam using creo ui editor. the .res file gets created. is there any particular location where it needs to be placed ?

 i use prouidialogcreate to load res file . is it the correct function iam using ? sometimes i get tk_general_error . when there is no error , no windows get displayed on creo window.  ProUIDialogActivate i use this function after ProUIDialogCreate. please guide me.

 

thanks 

 

3 replies

18-Opal
Dec 31, 2019 6:42 AM UTC

1.The generated RES file should be placed in text / resource within the folder where the toolkit is loaded.
 If you do not place the RES file in the text / resource folder in the ToolKit load point, DIALOG will not load correctly.

As an example of an attached dat file, test.res should be placed in text_dir, ie C: \ ptc \ protk \ text \ resource \.

P.S In case of test.res.dat, change the extension to res.

 

2.
Please refer to the following examples and comments.

void ProTestStdCloseAction (char * dialog, char * component, ProAppData data)
{
ProError status;
status = ProUIDialogExit (dialog, PRO_TK_NO_ERROR);
}
// call test.res dialog
ProError testDialog ()
{
char dialog [20] = "test.res"; // test.res must be locate in text / resource in toolkit load point
// create dialog
status = ProUIDialogCreate (dialog, dialog);
// default exit function set
status = ProUIDialogCloseActionSet (dialog, (ProUIAction) ProTestStdCloseAction, NULL);
// CloseBtn Click anction function set
status = ProUIPushbuttonActivateActionSet (dialog, "CloseBtn", (ProUIAction) ProTestStdCloseAction, NULL);
// dialog active and show
status = ProUIDialogActivate (dialog, NULL);
status = ProUIDialogDestroy (dialog);
return PRO_TK_NO_ERROR;
}

 

Translate
7-Bedrock
Aug 30, 2022 2:48 AM UTC
I made a dialog using UI Editor. Its extension is .res .
Could you please explain in detail how to load the dialog using Toolkit.
Translate
18-Opal
Aug 30, 2022 3:55 AM UTC

Please check the attached compressed file and code.

Translate