- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wasn't getting text drawn to the screen so I went thru a detailed debugging session and found my text was getting to the screen but then getting erased. The erasure was coming here:
! Read and process messsages
do while( GetMessage (mesg, NULL, 0, 0) .NEQV. .FALSE.)
if ( DlgIsDlgMessage(mesg) .EQV. FALSE ) then
ret = TranslateMessage( mesg )
ret = DispatchMessage( mesg )
end if
end do
This is the WinMain dispatch loop and it is not going to WinMainProc to erase the screen but just here when the screen flashes and removes all the text. Any suggestions?
Brooks Van Horn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DlgIsDlgMessage is of the logical(4) (default logical) which returns the Fortran value .TRUE. or .FALSE. The constants TRUE and FALSE in IFWIN are of type INTEGER(BOOL). The GETMESSAGE function returns a type of INTEGER(BOOL). I refuse to think about which might be 1 or 0 in this or that implementation. If you have standards warnings on it should moan at you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DlgIsDlgMessage is of the logical(4) (default logical) which returns the Fortran value .TRUE. or .FALSE. The constants TRUE and FALSE in IFWIN are of type INTEGER(BOOL). The GETMESSAGE function returns a type of INTEGER(BOOL). I refuse to think about which might be 1 or 0 in this or that implementation. If you have standards warnings on it should moan at you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yeah, .EQV. is not defined in the standard on non-LOGICAL types. Intel Fortran will convert the values to LOGICAL depending on the setting of /fpscomp:logicals. Assuming "Enable Fortran 2003 Semantics" is not enabled (which includes /fpscomp:logicals), if DlgIsDlgMessage returns an even value it will be considered .FALSE., even if it's non-zero. The PARAMETER constant FALSE is zero, so that works out ok either way. Enabling standards warnings would alert you to the non-standard conversion.
I wrote about this a long time ago here.
It sort of reads to me as if the window with "the screen" (whatever that is) isn't processing WM_PAINT messages properly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You might consider obtaining the handle to the control within the dialog box that you wish to update (e.g. the handle to a text box or to a chart, bitmap, etc...), then issue the Invalidate function. Use google, search
windows invalidate
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page