🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Shell popup menu

#5888
From: Remy Lebeau (TeamB)
Date: Thu, 23 Jun 2005 02:39
24 lines
1754 bytes
"qyte" <gyte@vivodinet.gr> wrote in message
news:42ba1384@newsgroups.borland.com...

> i have made the following project based on your reply.

You did not need to include all of the code I gave you in your reply.

> the problem is that the popupmenu doesn't get any item in it at all.

Yes, it does.

> the Label1 after i run button 2 takes the value 114.

When QueryContextMenu() succeeds, it returns the ID of the last item that
was added to the menu.  Which is exactly what you are getting.

Your menu does not get displayed because you are using a TPopupMenu with no
TMenuItem objects in it.  If you use the Win32 API CreatePopupMenu() and
TrackPopupMenu() functions, you will see that the code I gave does actually
work.


Gambit
Technical Details
Message-ID: <42ba20ea$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42b77365@newsgroups.borland.com> <42b781a4@newsgroups.borland.com> <42b9471a$1@newsgroups.borland.com> <42b9c800$1@newsgroups.borland.com> <42ba1384@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> <42b9471a$1@newsgroups.borland.com> <42b9c800$1@newsgroups.borland.com> <42ba1384@newsgroups.borland.com>
Subject: Re: Shell popup menu
Date: Wed, 22 Jun 2005 19:39:35 -0700
Lines: 26
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: <42ba20ea$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1119494378 68.69.17.41 (22 Jun 2005 19:39:38 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail