cancel
Showing results for 
Search instead for 
Did you mean: 

How to wait for modal window's return value

shark
Senior

A message box based on modal window widget with 2 buttons, one is ok, the other is cancel.When any button is clicked, modal window is hide and return the button value to the caller.

Can it be implemente in someway so it can be called like this?

int retValue = MessageBox(...);

Otherwise I have to fill callback fuction into the message box to get return result.

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

Hi, you can't do it like that - At least not in a non-convoluted way (e.g. A modal window might not always have a button, but will open and close based on a signal from the backend).

Callbacks is the way to go.

View solution in original post

1 REPLY 1
Martin KJELDSEN
Chief III

Hi, you can't do it like that - At least not in a non-convoluted way (e.g. A modal window might not always have a button, but will open and close based on a signal from the backend).

Callbacks is the way to go.