Article View: borland.public.cppbuilder.nativeapi
Article #14917Right Click On Dropdown ComboBox
From: CapStick
Date: Sat, 26 Jul 2003 22:58
Date: Sat, 26 Jul 2003 22:58
55 lines
2894 bytes
2894 bytes
Hello all.
I am using WIN ME OS
Free Borland Compiler.
using combobox
Resource is -:
COMBOBOX IDC_COMBOBOX ,0,51,61,90
WS_CHILD | WS_BORDER | WS_VSCROLL | CBS_SORT |
CBS_DROPDOWNLIST | CBS_HASSTRINGS
I am trying to show a popup menu, following a right click, on a dropped
down list, of combo box.
I already use right click on the parent dialog to show a menu
this works fine.
But when it comes to a right click being recognised
when combobox list is in view
i cannot seem to get a response to a right click.
i want to show a different menu for right click on combo drop down list.
My Code Is
case WM_CONTEXTMENU:
_______________________________________________________
// should get a message here as cb list is in view when
// i press right mouse button
// but No response.
// WIN 32 help states a return of TRUE if CB list is dropped
if (SendMessage(GetDlgItem(hDlg,IDC_COMBOBOX), CB_GETDROPPEDSTATE,0,0))
{
MessageBox(NULL,"You Right Clicked The list","ComboBox
Dropped Info",MB_OK|MB_ICONEXCLAMATION);
// call menu from here }
// Right Clicking ON THE Main DIALOG GETS ME A MENU AS // FOLLOWS
// pt.x = LOWORD(lParam); //Means WM_RBUTTONDOWN: so
// pt.y = HIWORD(lParam); // get the position of the window
GetWindowRect(hDlg, &rect);
pt.x = rect.left; // show menu
pt.y = rect.top+100; // in a definite position
DisplayMainPopupMenu(hDlg, pt);
// menu handling
break;
Any help gratefully appreciated.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.495 / Virus Database: 294 - Release Date: 30/06/2003
Technical Details
Message-ID:
<3f23070b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.online.be!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!news-xfer2.atl.newshosting.com!66.250.146.10.MISMATCH!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,80815163172346fd,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-26 16:01:41 PST From: "CapStick" <lol@ljones81.fsnet.co.uk> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Right Click On Dropdown ComboBox Date: Sat, 26 Jul 2003 23:58:13 +0100 Lines: 58 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 62.25.199.138 Message-ID: <3f23070b@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1059260171 62.25.199.138 (26 Jul 2003 15:56:11 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.online.be!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!news-xfer2.atl.newshosting.com!66.250.146.10.MISMATCH!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail