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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

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

ahsieh
1-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
Eike_Hauptmann
13-Aquamarine
(To:ahsieh)

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

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

Try using the same value for these two.

Ben_C
6-Contributor
(To:ahsieh)

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

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

Top Tags