dialog with CANCEL button

dialog with CANCEL button

Postby damianodec » Mon Jan 15, 2018 11:37 am

hi to all
I know MsgRun() or MsgMeter() function, but this functions have not CANCEL button to stop codeblock inside.
is there any function or example with dialog that run any function and with CANCEL button to stop that function?
thanks.
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: dialog with CANCEL button

Postby James Bott » Tue Jan 16, 2018 8:27 pm

Well, you can use a non-modal dialog with a Cancel button, but the hard part is how is the codeblock going to determine when the button is pressed?

Perhaps you can use the oDialog:cargo property to hold a flag which defaults to .T. and when the button is pressed, change the flag to .F. and then the codeblock would see the change the next time through the loop (assuming the codeblock is in a loop).

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 106 guests