Skip to main content
1-Visitor
March 3, 2015
Solved

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

  • March 3, 2015
  • 1 reply
  • 4527 views

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

Best answer by ptc-2162721

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.

1 reply

ptc-21627211-VisitorAuthorAnswer
1-Visitor
March 5, 2015

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.

14-Alexandrite
July 27, 2016

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.

12-Amethyst
June 29, 2020

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