Skip to main content
1-Visitor
Mar 3, 2015 10:19 AM UTC
Solved

OTK C++ - Creation of Dialog fails the second time

I try to create a simple dialog, which will be closed by pressing the Cancel-Button.

The first time the dialog is started, everything works correct.

uifcCreateDialog, uifcActivateDialog, uifcExitDialog and uifcDestroyDialog return 0 and

no exception is thrown.

But starting the dialog the second time fails. Calling uifcCreateDialog returns -1 and the

dialog is not created. For some hints I would be grateful.

Thanks in advance.

 

Versions:

Creo Parametric 3.0 - 64 bit

Windows 7 64 Bit

C++ Object Toolkit

1-Visitor
Mar 5, 2015 12:13 PM UTC

The second parameter of uifcCreateDialog is the resource. I tried to use a relative or absolute path to this file, which results in this strange behaviour. Copying the file to the right place and using only the name without extension solved the problem for me.

6 replies

ptc-21627211-VisitorAuthorAnswer
1-Visitor
Mar 5, 2015 12:13 PM UTC

The second parameter of uifcCreateDialog is the resource. I tried to use a relative or absolute path to this file, which results in this strange behaviour. Copying the file to the right place and using only the name without extension solved the problem for me.

Translate
14-Alexandrite
Jul 27, 2016 5:25 AM UTC

Does this mean that it did not work with a subdirectory? I'm experiencing a similar issue now, and have my resource file located in a subdirectory from the "text/resource" folder.

Translate
12-Amethyst
Jun 29, 2020 1:48 AM UTC

The Dialog resource file should be in your peoject directory ./txt/resource/GearTest.res

Translate