🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8890

Re: Sending a message to a combobox.

#8890
From: Bob Gonder
Date: Fri, 27 Aug 2004 16:56
27 lines
1842 bytes
Bogdan wrote:

>I have an application that need to access the file type combobox in an
>savefile
>window.Does anybody know how to programatically select an item in this
>combobox and how to read the string value of that item from another
>application.I have the handle to the combobox, but i don't know what
>message to send to it.

In Win32.hlp, see "Explorer-Style Control Identifiers" for the ID.
Look under "Combo Box Messages" for things you can do to the ComboBox.

The rest of this is guessing.

To read the SELECTED list value:
	You start with CB_GETCURSEL to get an index
	Then CB_GETLBTEXTLEN to find out how big it is
	Then CB_GETLBTEXT

To read the EDIT portion:
	WM_GETTEXTLENGTH
	WM_GETTEXT

Use SendMessage() for these, and check the return values.

It's easier if the dialog is in your own app, just check the values
returned in the OPENFILENAME structure.
Technical Details
Message-ID: <6houi0lksem9ltuppe7sps3d7i0i37f9gj@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <412f46ef$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,830c14d42f9adbe2
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Sending a message to a combobox.
Date: Fri, 27 Aug 2004 09:56:09 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <6houi0lksem9ltuppe7sps3d7i0i37f9gj@4ax.com>
References: <412f46ef$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.68.103.211
X-Trace: newsgroups.borland.com 1093625768 69.68.103.211 (27 Aug 2004 09:56:08 -0700)
Lines: 29
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail