Terry, if you know the control ID, then you can use
"GetDlgItem" to get the control handle.
Once you have the control's handle, you can send
LB_SETCURSEL to select an item.
For this and other control-specific messages, I
recommend Dan Appleman's "Visual Basic Programmer's
Guide to the Win32 API" book.
cheers, jw
> I need to interact with another application, such as selecting an item in a
> combobox, setting the text in a textbox, checking a checkbox, etc. I know
> the ControlID's for each control in the applicaiton that I need to access.
> I'm assuming that I'd use the API SendMessage or PostMessage calls, but I'm
> at a loss as to how to go about it. Could someone point me in the right
> direction?
Terry Olsen - 29 Jan 2007 05:10 GMT
Thanks! That helped alot!
> Terry, if you know the control ID, then you can use
> "GetDlgItem" to get the control handle.
[quoted text clipped - 14 lines]
>> calls, but I'm at a loss as to how to go about it. Could someone point
>> me in the right direction?