Announcement

Collapse
No announcement yet.

DIALOG END

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Egbert Zijlema
    replied
    As far as I've experienced, DIALOG END can be used from within any SUB or FUNCTION, not only
    in explicitely connected CALLBACK FUNCTIONs. The only difference is that outside such a CALLBACK
    FUNCTION you cannot use DDT-keywords, e.g. CBHNDL. Instead you must use the dialogs genuine handle.
    This can be achieved by giving it global access.

    Code:
    GLOBAL hDlgGlobal AS LONG 
    
    SUB BuildDialog
      DIALOG NEW ................... TO hDlg&
      hDlgGlobal = hDlg& 
      ' here your code to build controls etc.
      SHOW DIALOG ....
    END SUB
    Using hDlgGlobal you now can access the dialog from everywhere in your program.

    ------------------
    mailto:[email protected][email protected]</A>
    www.basicguru.com/zijlema/

    Leave a comment:


  • Dan Soper
    started a topic DIALOG END

    DIALOG END

    originally posted by lance edmonds in http://www.powerbasic.com/support/pb...ead.php?t=2889:
    dialog end, like enddialog(), should *only* be used in the dialog box procedure for the target dialog. neither of your examples obey this rule.
    see enddialog() in win32.hlp for more information.
    dialog end is a wrapper for enddialog(), so the same basic rules apply to both the statement and the api call.
    ok, so i looked in win32.hlp. according to that, enddialog() should only be used with modal dialogs.

    but dialog end is used on both modal nad modeless dialogs. if it's just a wrapper for enddialog(), shouldn't we be terminating our modeless dialogs by some other technique?
    and if dialog end is ok to use with modeless dialogs, does the "use dialog end only within callback" rule still apply?

    ------------------
    --dan

    [this message has been edited by dan soper (edited november 15, 2000).]
Working...
X