User (Legacy) Posted May 29, 2002 Report Share Posted May 29, 2002 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 More sharing options...
Software FX Posted May 29, 2002 Report Share Posted May 29, 2002 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 More sharing options...
User (Legacy) Posted May 29, 2002 Author Report Share Posted May 29, 2002 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 More sharing options...
Software FX Posted May 30, 2002 Report Share Posted May 30, 2002 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.