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]
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]
Comment