I need a modal dialog with a button on it to cancel. I thought dc_working would fullfill this need.
However it seems as with dc_working a user can click on another part of the screen and the dc_working dialog goes into the background.
I changed the behaviour so with each dc_working(1) to update the dialog there is a oDlg:tofront() executed. This way the dc_working dialog displays again after each refresh.
Code: Select all
...
IF DC_LangSet() == DCLANG_CHINESE .OR. .t.
oDlg:cargo:SetCaption(Repl('||',nWORK_CURRCOL-nWORK_STCOL))
ELSE
oDlg:cargo:SetCaption(Repl(Chr(31)+Chr(31),nWORK_CURRCOL-nWORK_STCOL))
ENDIF
oDlg:tofront() <<<<<<<--------------------- new line added, brings it to front.
IF Valtype(aWORK_CANCEL) = 'L'
DO WHILE nEvent # xbeP_None .AND. nEvent # 0
nEvent := AppEvent( @mp1, @mp2, @oXbp, .01 )
IF Valtype(oXbp) = 'O'
...