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

ProUIDialogCreate first time return 0 but second time return -1 ?

ahsieh
Newbie

ProUIDialogCreate first time return 0 but second time return -1 ?

I got a problem about created dialog, the steps create -> activate -> exit -> destroy worked fine at first but second time failed.

creo 2.0 M230

win7 x64

 

first, dialog shows normally

createError.jpg

createError_2.jpg

 

after close dialog then click button again, dialog doesn't show up

 

createError_3.jpg

 

 

this discussion describes the same situation but the solution doesn't work for me.

Solved: OTK C++ - Creation of Dialog fails the second time - PTC Community

4 REPLIES 4

Re: ProUIDialogCreate first time return 0 but second time return -1 ?

If the status is -1 he can't create the dialog because the old one is created already.

Or he can't find the .res file because it's at the wrong location. (Could be also a problem with the resource remembering management).

My std. Code look nearly the same:

  char * gtqae_DIALOG_NAME = "gtqae_dialog";

  prerr = ProUIDialogCreate(gtqae_DIALOG_NAME, "gtqae_dialog.res");

So I use .res at the second one ... first one could be with or without .res ... never had problems with that.

You could try to change the foldertypes by using :

  ProUITranslationFilesEnable(); as first line inside your user_initialize method.

Br,

Eike

Re: ProUIDialogCreate first time return 0 but second time return -1 ?

Make sure that you are using correct 'dialog_name' and 'resource' in the API call.

Try using the same value for these two.

Re: ProUIDialogCreate first time return 0 but second time return -1 ?

I am having a very similar issue to this, did you solve this issue?

Re: ProUIDialogCreate first time return 0 but second time return -1 ?

I am also currently experiencing problems.
If so, please share your solution.

Announcements