cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

creating a creo ui

Sekar1
12-Amethyst

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 3

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;
}

 

Clara_Lee
6-Contributor
(To:CHASEONHO)

I made a dialog using UI Editor. Its extension is .res .
Could you please explain in detail how to load the dialog using Toolkit.

Please check the attached compressed file and code.

Top Tags