News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

dialog focus

Started by shankle, January 18, 2012, 09:57:59 PM

Previous topic - Next topic

shankle

Hate to ask but.....
Have created my very own Find Dialog box.
But a user would have to hit the enter key to get focus to the add text area.
Microsoft says not to use SetFocus/GetFocus  but to use WM_NEXTDGLCTl.
1st WM_NEXTDLGCTL wants a PROTO statement. Then the paramaters are
a tad confusing to code.
Maybe I am all wet and there is another way to accomplish the same thing.
The greatest crime in my country is our Congress

MichaelW

WM_NEXTDLGCTL is old (95) and it is defined in the MASM32 windows.inc (or at least it was in the last version 11 beta), so something like this:

invoke SendMessage, hwnd_target_control, WM_NEXTDLGCTL, wparam_val, lParam_val

or this:

invoke PostMessage, hwnd_target_control, WM_NEXTDLGCTL, wparam_val, lParam_val

should work, assuming appropriate values for hwnd_target_control, wparam_val, and lParam_val.

eschew obfuscation

shankle

Thank you Michaelw for responding.
Will give it a whirl.
Was having problems deciding what goes in Wparam and Lparam
The greatest crime in my country is our Congress