Announcement

Collapse
No announcement yet.

DDT - Dialog End

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

  • Semen Matusovski
    replied
    Dennis --
    I meat this question some times and also the answer (offered by Lance).
    In WM_COMMAND instead of Dialog End you execute
    PostMessage CbHndl, %WM_USER + xxx, 0, 0
    In %WM_USER + xxx 's event - Dialog End


    ------------------

    Leave a comment:


  • Dennis Pearson
    started a topic DDT - Dialog End

    DDT - Dialog End

    In a DDT dialog I have an edit control. If I add a Dialog End CBHNDL to the WM_Command message for the edit control, I get an illegal function call error in user32. If I use Dialog Send WM_Close it closes and aborts. The dialog is a simple calculator which I close on certain keypresses.

    CASE &H111 '%WM_COMMAND
    SELECT CASE LOWRD(CBWPARAM)
    CASE 101 'Edit Box
    Dialog End CBHNDL 'Causes error


    CASE &H111 '%WM_COMMAND
    SELECT CASE LOWRD(CBWPARAM)
    CASE 101 'Edit Box
    DIALOG SEND CBHNDL, &H10, 0, 0 'WM_Close Works OK
    Function = 1
    Exit Function

    CASE &H111 '%WM_COMMAND
    SELECT CASE LOWRD(CBWPARAM)
    CASE 1, 101 'Enter Key/Edit Box
    Dialog End CBHNDL 'Causes error if the LOWRD(CBWPARAM) is <> 0
    Function = 1
    Exit Function

    Comments?


    -------------
    [email protected]
Working...
X