Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to select an item in combobox of another application.

Posted on 2000-03-27
4
Medium Priority
?
945 Views
Last Modified: 2010-04-04
I write an application to select the items in the combobox of  another application.
I got window handle for Combobox and I sent.
sendmessage(ghwndCombo, WM_LBUTTONDOWN, 0, 0);
  sendmessage(ghwndCombo, WM_LBUTTONUP, 0, 0);
Then, I can see a list of items in combobox but I can not select the item that I want to. How to select an item in combobox?. What parameter to pass in Sentmessage function?.
0
Comment
Question by:Suttee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:Suttee
ID: 2656747
Adjusted points from 50 to 60
0
 

Author Comment

by:Suttee
ID: 2656776
Adjusted points from 60 to 100
0
 
LVL 21

Expert Comment

by:gemarti
ID: 2661691
Try:

SendMessageCallback(
hWnd: HWND;  //handle to a window
Msg: UINT; //the identifier of the msg. to send
wParam:WPARAM; //32bit msg value
lParam: LPARAM; //32bit msg value
lpResultCallBack:TFNSendAsyncProc; //pointer to an app-defined callback procedure
dwData:DWORD //app defined value
); BOOL  // returns true or false

0
 
LVL 1

Accepted Solution

by:
vorisek earned 400 total points
ID: 2754483
An application sends a CB_SETCURSEL message to select a string in the list of a combo box:

CB_SETCURSEL
wParam = (WPARAM) index;  // item index
lParam = 0;               // not used;

sendmessage(ghwndCombo, CB_SETCURSEL, index, 0)

You can also use CB_SELECTSTRING to select defined string.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question