en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en nl en en en en en en en en en en en de fr en en en en nl en en en nl en en en fr en en fr pt en en en en en en en nl en en en en en en en en en en de en en en fr en en en en en en en en en pt en en en en en en
By logging into your account, you agree to our Privacy Policy, personal data processing and storage practices as described therein.
Forgot password or user name?
Search in titles only Search in PowerBASIC for Windows only
You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Closing DDT program during WM_INITDIALOG
All Time Today Last Week Last Month
All Discussions only Photos only Videos only Links only Polls only Events only
Join Date: May 1999
Closing DDT program during WM_INITDIALOG
28 Jan 2001, 01:57 PM
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.
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
Join Date: Aug 1998
28 Jan 2001, 02:24 PM
You cannot destroy a dialog during %WM_INITDIALOG. The easy solution is to POST a message to the dialog and then abandon ship when that message arrives.
CASE %WM_INITDIALOG IF somecondition THEN PostMessage CBHNDL, %WM_USER + 999&, 0, 0 CASE %WM_USER+999& DIALOG END CBHNDL ... END FUNCTION
Join Date: May 1999
28 Jan 2001, 02:28 PM
Thanks Lance - its a good job you're on the other side of the planet so when I'm programming at night someones there in their morning !
Copyright © 1998-2022 PowerBASIC Tools, LLC - All Rights Reserved.
Powered by vBulletin® Version 5.7.0
Copyright © 2022 vBulletin Solutions, Inc. All rights reserved.
All times are GMT-5. This page was generated at 04:16 AM.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.