Jump to content
Software FX Community

return value


User (Legacy)
 Share

Recommended Posts

When you use ShowDialog method, this method should return zero (0) if the

user pressed the CANCEL button. But I have noticed that the return value

for using ShowDialog(CDIALOG_IMPORTFILE, 0) method is non-zero value even

when the user pressed the CANCEL button.

I was wondering for showing the Import Chart File dialog box, what kind of

return value should be when user pressed the CANCEL button?

Thanks,

Danqing

Link to comment
Share on other sites

Since there is an apply button, pressing cancel or ok doesn't make a

difference (you can click Apply and then Cancel and this is equivalent to

pressing OK).

You will receive an InternalCommand event with CFX_ID_APPLY whenever Apply

(or OK) is pressed, this way you can tell if something was changed.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

I didn't find the apply button in the Import Chart File dialog box. Only

OPEN and CANCEL buttons.

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:IN4Al6zBCHA.1448@webserver1.softwarefx.com...

> Since there is an apply button, pressing cancel or ok doesn't make a

> difference (you can click Apply and then Cancel and this is equivalent to

> pressing OK).

>

> You will receive an InternalCommand event with CFX_ID_APPLY whenever Apply

> (or OK) is pressed, this way you can tell if something was changed.

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

I'm sorry, my mistake I was thinking of the Properties Dialog, sorry about

that.

In the case of the Open File, you do receive a return value, but it is a

combination of two things:

1) In the LOWORD you receive the Dialog Return Code (0 = Cancel, 1 = OK)

2) In the HIWORD you receive -1 if the dialog caused the chart to reload, or

0 if not.

In your case you need to check for the LOWORD only.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...