Announcement

Collapse
No announcement yet.

DDT dialog end problems...

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

  • Semen Matusovski
    replied
    In some situations it's necessary to use "delay" method.
    Code:
       #Compile Exe
       #Dim All
       #Register None
       #Include "WIN32API.INC"
       
       CallBack Function DlgProc
          Select Case CbMsg
             Case %WM_INITDIALOG: PostMessage CbHndl, %WM_USER + 1, 0, 0
             Case %WM_USER + 1  : Dialog End CbHndl
           End Select
       End Function
    
       Function PbMain
          Local hDlg As Long
          Dialog New 0, "DDT",,, 100, 100 To hDlg
          Dialog Show Modal hDlg Call DlgProc
          MsgBox "Finished"
       End Function
    ------------------
    E-MAIL: [email protected]

    Leave a comment:


  • mark smit
    Guest replied
    Never mind!


    I guess you can't use DIALOG END CBHNDL while processing the WM_INITDIALOG message. I was trying to open a UDP socket in WM_INITDIALOG and if that failed I called DIALOG END CBHNDL.

    ------------------
    Cheers

    Leave a comment:


  • mark smit
    Guest started a topic DDT dialog end problems...

    DDT dialog end problems...

    Hello all,


    If you create a modal dialog that also has a callback function. What is the proper way to kill the dialog box and exit the program?

    I have tried using DIALOG END CBHNDL. The dialog does get destroyed but for some reason it doesn't bail out of the message pump.

    ------------------
    Cheers
Working...
X