Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
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
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;
}
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.