Article View: borland.public.cppbuilder.nativeapi
Article #5899Re: Shell popup menu
From: Remy Lebeau (TeamB)
Date: Thu, 23 Jun 2005 23:02
Date: Thu, 23 Jun 2005 23:02
21 lines
1779 bytes
1779 bytes
"Antreas7" <antreas7@gmail.com> wrote in message news:42bb287b$1@newsgroups.borland.com... > I used these function as you did and the popup menu worked fine. > The problem is that nothing is done when you click with the mouse > an item of the popup menu. Yes, it does. You just haven't set up the rest of your code to do anything about it. > How can i add the events on these items? If you use CreatePopupMenu() and TrackPopupMenu(), then TrackPopupMenu() takes as a parameter the HWND that will receive the WM_COMMAND message for the menu items. You can then intercept that message, pull out the ID of the menu that was clicked on, and then call the IContextMenu's InvokeCommand() method to perform the action for the clicked menu item. Gambit
Technical Details
Message-ID:
<42bb3f9c$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<42b77365@newsgroups.borland.com> <42b781a4@newsgroups.borland.com> <42b95c7f@newsgroups.borland.com> <42b9c800$3@newsgroups.borland.com> <42bb287b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,49d4c9bc0c0cea4b X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <42b77365@newsgroups.borland.com> <42b781a4@newsgroups.borland.com> <42b95c7f@newsgroups.borland.com> <42b9c800$3@newsgroups.borland.com> <42bb287b$1@newsgroups.borland.com> Subject: Re: Shell popup menu Date: Thu, 23 Jun 2005 16:02:54 -0700 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <42bb3f9c$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1119567772 68.69.17.41 (23 Jun 2005 16:02:52 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail