Software Archive
Read-only legacy content

DlgFlush

kvrichardson
Beginner
308 Views
In a Quickwin project, I using a callback routine to update a list box IDC_LIST1 with solution data as it comes out, line by line. It is intended for effect - slowly roll out the solution - and I use SECNDS to delay in between lines. After each line (such as retlog=dlgset(dlg,IDC_LIST1,str,row) I call DLGFLUSH, increment the row variable, and begin a few seconds delay.

Unfortunately no lines are updated - only after the callback is finished do the lines actually get drawn to the screen. Any ideas?

Thanks
Keith
0 Kudos
1 Reply
kvrichardson
Beginner
308 Views
I found it! Another case of looking at the terse documentation and manually trying every possible implementation.

I put the documentation's code to force processing of the dlgset messages into a subroutine (Below). Then I just added "call MSGSETUP" after "call DLGFLUSH".

SUBROUTINE MSGSETUP
use DFWINTY
use USER32
use dflogm

logical lNotQuit, lret
integer iret
TYPE (T_MSG) mesg

lNotQuit = .TRUE.
do while((lNotQuit).AND.((PeekMessagemesg,0,0,0,PM_NOREMOVE).ne.0)))
lNotQuit = GetMessage(mesg, NULL, 0, 0)
if (lNotQuit) then
if (DLGISDLGMESSAGE(mesg)==.FALSE.) then
lret = TranslateMessage(mesg)
iret = DispatchMessage(mesg)
end if
end if
end do
RETURN
END
0 Kudos
Reply