Article View: borland.public.cppbuilder.nativeapi
Article #8889Re: Sending a message to a combobox.
From: Timothy H. Buchman
Date: Fri, 27 Aug 2004 16:32
Date: Fri, 27 Aug 2004 16:32
38 lines
2198 bytes
2198 bytes
Bogdan <boprea> wrote in message
news:412f46ef$1@newsgroups.borland.com...
> 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
See if you can read the lines of the box with this previously used
snippet. I have some doubts about being able to select and item from
*another app*. And in this case, the combobox is the "property" of
Windows (since it's created by an API), so you may not even be able to
read it.
countmsg=CB_GETCOUNT;
textmsg=CB_GETLBTEXT;
combocount=SendMessage(handle,countmsg,0,0);
if(combocount<1)
{
PropListBox->Items->Add(
"Not a ComboBox or has no contents.");
return;
}
for(i=0;i<combocount;i++)
{
SendMessage(handle,textmsg,(WPARAM)i,(LPARAM)(LPCTSTR)buff);
PropListBox->Items->Add(buff);
}
--
Timothy H. Buchman
========================================
City Center Theater, New York NY
mail address tbuchmanPLEASE(at sign)REMOVEcitycenter.org
Search .borland message archive on http://www.tamaracka.com/search.htm
Technical Details
Message-ID:
<412f622f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<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: "Timothy H. Buchman" <tbuchmanPLEASE(at sign)REMOVEcitycenter.org> Newsgroups: borland.public.cppbuilder.nativeapi References: <412f46ef$1@newsgroups.borland.com> Subject: Re: Sending a message to a combobox. Date: Fri, 27 Aug 2004 12:32:41 -0400 Lines: 39 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 NNTP-Posting-Host: 68.166.99.162 Message-ID: <412f622f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1093624367 68.166.99.162 (27 Aug 2004 09:32:47 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail