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

Getting ProUISpinbox value in CREO Toolkit

SOLVED
PARTHIBAN_K
Moonstone

Getting ProUISpinbox value in CREO Toolkit

Hi,

     I am repeatedly getting fatal error when try to get the value of spinbox, My code is below

int RunSpinBox()

{

  ProError status;

  int   i;

  char * dialog = "mcheck_plus_resource";

  ProUISpinboxIntegerGet(dialog,"ItemValue",&i);

  MessageBox(0,i,"SpinBox Value",1);

}

I have attached error file. Please anybody help to solve the issue.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Getting ProUISpinbox value in CREO Toolkit

I'd say that the error is caused by the MessageBox function.

Here is the function prototype as described on MSDN website:

int WINAPI MessageBox(
  _In_opt_ HWND    hWnd,
  _In_opt_ LPCTSTR lpText,
  _In_opt_ LPCTSTR lpCaption,
  _In_     UINT    uType
);

First function parameter is of type HWND and you are using an constant integer (0). Second parameter has to be a string and you are passing an integer.

Normally this types of errors are captured at the compilation time.

Personally I prefer to use ProUIMessageDialogDisplay instead of MessageBox.

Other items you need to double check are the dialog and spinbox names? Do the "mcheck_plus_resource" and "ItemValue" match the names on your resource file?

View solution in original post

1 REPLY 1

Re: Getting ProUISpinbox value in CREO Toolkit

I'd say that the error is caused by the MessageBox function.

Here is the function prototype as described on MSDN website:

int WINAPI MessageBox(
  _In_opt_ HWND    hWnd,
  _In_opt_ LPCTSTR lpText,
  _In_opt_ LPCTSTR lpCaption,
  _In_     UINT    uType
);

First function parameter is of type HWND and you are using an constant integer (0). Second parameter has to be a string and you are passing an integer.

Normally this types of errors are captured at the compilation time.

Personally I prefer to use ProUIMessageDialogDisplay instead of MessageBox.

Other items you need to double check are the dialog and spinbox names? Do the "mcheck_plus_resource" and "ItemValue" match the names on your resource file?

View solution in original post

Announcements