Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Crash with Dialogs

Brooks_Van_Horn
New Contributor I
408 Views

I have ab About dialog that looks like:

Type (dialog) mDlg

            bret = DlgInit(IDD_ABOUT,mDlg)
            iret = DlgModal(mDlg)
            Call DlgUnInit(mDlg)

Now the dialog box is simple (3 static text boxes and an IDOK button. The dialog displays correctly when asked but it crashes when I hit the OK button. Any ideas?

Brooks V

0 Kudos
4 Replies
andrew_4619
Honored Contributor II
408 Views

The info is a bit sparse to make an informed comment. Are there any callbacks setup for the dialog, is the OK really set to the system IDOK? Do you get any trace back for the crash? It could simply be some stack corruption caused by something you did prior to the dialog.....

Can you make a simple  and complete program that demonstrates the problem?

 

0 Kudos
Steven_L_Intel1
Employee
408 Views

It would probably be helpful if you attached a small but complete test case showing the problem. I generally find that small code excerpts and "looks like" fragments don't show the real problem.

0 Kudos
Brooks_Van_Horn
New Contributor I
408 Views

I take it that neither one of you has ever run into this type of problem. To answer Andrew's questions, there is no callback. I basically took an example in CVF's example on an About box and have only one button. Here is the component from the rc file:


IDD_ABOUT DIALOGEX 208, 0, 159, 189
STYLE DS_SETFONT | DS_3DLOOK | WS_POPUP | WS_BORDER
FONT 14, "Arial Narrow", 700, 0, 0x0
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,66,170,26,10,BS_CENTER | BS_BOTTOM
    LTEXT           "Pearson Distribution Curves",IDC_STATIC,36,3,86,8
    LTEXT           "This program takes the first four moments of a statistical unimodal diatribution and will fit a Pearson Curve to them. The Pearson Curves used in this program completely cover the solution space of all Pearson Curves.",IDC_STATIC,10,24,138,42
    LTEXT           "Once a distribution curve is selected it can create a pseudo-random sample from the distribution. Statistics are presented about the curve as well as graphs of the prability density and cumulative distribution functions.",IDC_STATIC,10,73,138,48
    LTEXT           "This program incorporates the eratta to the data presented by Sir William Palin Elderton in his 1969 book ""Systems of Frequency Curves."".",IDC_STATIC,10,128,138,34
END


I'll work at creating a more simple app to do the same thing; but it'll take me a little time.

Brooks V

0 Kudos
andrew_4619
Honored Contributor II
408 Views

I can think of any obvious causes, but clear the is a cause and effect....  I recall you could also do that with a call the messageboxqq something like:

USE IFQWIN
result = MESSAGEBOXQQ (&
                             'Some Text'//achar(13)//&
                             'some more text on a new line'//achar(13)//&
                             ' and some more'//achar(0), &
                             'Title Text'//achar(0),&
                              MB$OK)

 

0 Kudos
Reply