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

Close dialog

Giel_H_
Beginner
1,619 Views

When creating a new project via the route Intel Fortran Application - Windows Application - Dialog-based sample code, the sample code yields an executable in which one can pressan "Apply" button and an "Exit" button. When the "Exit" button is pressed the dialog window closes. The dialog window frame also contains a "close" button (red button with a white cross). The problem is that the "close" button (when pressed) doesn't close thedialog window. A minimize or maximize buttoncan be added (next to the "close" button) by editing the dialog id resource properties. The minimize and maximize button do actually work.

Please provide a solution for the "close" button problem.

0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
1,619 Views
The bug is in the sample code. When the button is pressed, it behaves identically as if you pressed a button with identifier IDCANCEL (=2). However, the DFLOGM code checks if a button with IDCANCEL exists, and, not having found it, does nothing.

Solution: add a button with "Close" or "Cancel" caption and assign identifier IDCANCEL to it (or change the properties of "Apply" button if you don't need it). The button may even be hidden (Visible=false) if you don't want it visible.
0 Kudos
Giel_H_
Beginner
1,619 Views
Thank you Jugoslav for your fast reply.It works with a "Close" button and assigned identifier IDCANCEL..
0 Kudos
Reply