Hi all, am I doing something stupid ?
I want to have the option of closing a DDT based program during the WM_INITDIALOG message. Listing 'A' hides the program (but task manager still shows it running), listing 'B' show the dialog and it has to be manually closed.
The mnuClose message just does DIALOG END CBHNDL ,0 and it works if I manually click on the menu item.
Regards
Adrian Aitken
------------------
I want to have the option of closing a DDT based program during the WM_INITDIALOG message. Listing 'A' hides the program (but task manager still shows it running), listing 'B' show the dialog and it has to be manually closed.
The mnuClose message just does DIALOG END CBHNDL ,0 and it works if I manually click on the menu item.
Regards
Adrian Aitken
Code:
Listing A SELECT CASE CBMSG CASE %WM_INITDIALOG DoSomeThing IF JustOnce THEN DIALOG END CBHNDL, 0 EXIT FUNCTION END IF Listing B SELECT CASE CBMSG CASE %WM_INITDIALOG DoSomeThing IF JustOnce THEN DIALOG SEND CBHNDL , %WM_COMMAND , 0 , %mnuCLOSE EXIT FUNCTION END IF
Comment