- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using CVF 6.6a with Xp Home. The code I generated with Developer Studio and the Fortran Windows tempelate (Win32 APIs) displays a modal dialog box with the OK and CANCEL buttons. This code works fine on the Xp machine, but when I run it on under Win2k the dialog box and Dialog box title bar are not visible, but the OK and Cancel buttons are. If I build one of the sample programs that includes a modal dialog box from the DF98 directory on the Win2K machine, the dialog box displays normally. I created a simplified code, attached, which produces the same results as above. Any ideas or suggestions would be appreciated! Thanks.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's not compilable as-is (TestDlgGlobals are missing) (please attach a .zip with .dsw, .dsp, .rc, resource.fd, resource.h and *.f90 in the future), but the most likely cause is that return value from TestDlgProc is undefined (you should return 0 in case default). Being undefined, it's a random value which takes different values on different OSes.
Basically, when TestDlgProc returns a (random) non-zero value, it says that all the messages are handled there, including WM_PAINT and WM_NCPAINT -- that's why DefDlgProc does nothing and your dialog is not displayed.
Jugoslav
Basically, when TestDlgProc returns a (random) non-zero value, it says that all the messages are handled there, including WM_PAINT and WM_NCPAINT -- that's why DefDlgProc does nothing and your dialog is not displayed.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply. Zip file attached. When compiled on my Win2K and Win98 machines the attached code displays the ABOUT dialog box (created by the Fortran Windows template) correctly, however, the dialog box created by me in the resource editor does not. The only thing that appears are the controls that were on the dialog box. On WinXP the code compiles and displays properly. Could be something simple that I am doing that is creating the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But you still didn't add
Jugoslav
case default TestDlgProc=0?
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. I understand now, and have added 'case default' to the code. The dialog box is now visible. I thought that the expression 'TestDlgProc = 0' before 'end select' was sufficient. Thank you again.
Gainesville, Virginia
Gainesville, Virginia

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page