Article View: borland.public.cppbuilder.nativeapi
Article #4827Re: Ownerdrawn combo box problem
From: JD
Date: Fri, 25 Nov 2005 23:19
Date: Fri, 25 Nov 2005 23:19
19 lines
1558 bytes
1558 bytes
Martin Golm <golm@gmx.de> wrote:
>
> Okay, here's a "working" example for the problem, i.e. it
> demonstrates that something's wrong with the combo box.
The problem is with how you create it.
> cb = CreateWindow("COMBOBOX", "", style, 2, 2, 100, 25, Handle, 0, 0, 0);
You passed in a height of 25 which is only enough for the
drop down list to be drawn with a height of one pixel. This
is the cause because there is never enough room for an item
to be drawn so the only value that you'll ever see is -1.
Increase the nHeight parameter to 100 (actually should be
the desired dropdown count * item height).
~ JD
Technical Details
Message-ID:
<4387aa28$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4383006E.F33D5F94@gmx.de> <43858C68.6E541AE2@gmx.de>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,963aa3ddf5359b86 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "JD" <nospam@nospam.com> Sender: "JD" <nospam@nospam.com> Reply-To: "JD" <nospam@nospam.com> Subject: Re: Ownerdrawn combo box problem Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 205.188.116.198 X-Forwarded-For: 172.132.81.241 References: <4383006E.F33D5F94@gmx.de> <43858C68.6E541AE2@gmx.de> NNTP-Posting-Host: 207.105.83.66 Message-ID: <4387aa28$1@newsgroups.borland.com> Date: 25 Nov 2005 16:19:52 -0700 X-Trace: newsgroups.borland.com 1132964392 207.105.83.66 (25 Nov 2005 16:19:52 -0700) Lines: 20 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail