Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!godot.cc.duq.edu!newsgate.duke.edu!news.mathworks.com!newsfeed.internetmci.com!newsreader.sprintlink.net!news.sprintlink.net!news-fw-22.sprintlink.net!news.sprintlink.net!news-ana-7.sprintlink.net!news.sprintlink.net!news-ana-24.sprintlink.net!news.sprintlink.net!news-stk-3.sprintlink.net!judith.state.net!technix!fourthgen!usenet
From: Clyde Cutting <cutting@fourthgen.com>
Subject: Re: VA - WinNT right button menu problem.
Content-Type: text/plain; charset=us-ascii
To: beilby@qsr.com.au
Sender: usenet@fourthgen.fourthgen.com (Charlie Root)
Content-Transfer-Encoding: 7bit
Nntp-Posting-Host: slip129
Organization: Fourth Generation, Inc.
Message-ID: <DuzCzD.4rJ.E.fourthgen@fourthgen.fourthgen.com>
References: <01bb72d6.33f2f970$13f8ac83@scorpius> <31EA73B7.4F80@tfh-berlin.de> <01bb7395.bce50e70$13f8ac83@scorpius> <Duq14q.Aw3.E.fourthgen@fourthgen.fourthgen.com> <4snt0p$e66@rtpnews.raleigh.ibm.com> <01bb7766.021e72a0$13f8ac83@scorpius>
X-Mailer: Mozilla 1.1PE (Windows; I; 16bit)
Mime-Version: 1.0
Date: Tue, 23 Jul 1996 05:09:13 GMT
Lines: 34

A potential solution to the popup menu problem in VA for Win 95 under
Win NT (and 95?). I think from IBM's PCLink forum on CompuServe:

>*Execute the following code:
>
>OSWidget eventTableAt:
>17r7B "WmContextmenu" put: #wmContextmenu:with:
>
>*Add the following to OSTextEdit
>wmContextmenu: wParam with: IParam
>	"Private - Processes WM_CONTEXTMENU messages."
>	| result |
>	(result := super wmContextmenu: wParam with: IParam) == nil
>		ifFalse: ^result.
>
>"Feature in Windows. When the default window proc for the receiver
>runs, it pops up a default edit menu. This means that when an
>application adds a pop up menu, the user will see both the default
>text edit menu and the application menu. The fix is to prevent the
>window proc for the receiver from running."
>
>*Change OSWidget>>#wmContextmenu:with:
>To return nil instead of true.

I haven't tried this solution yet so can't vouch for it. I heard
something about it working for popup menus in some panes but not in
text ones.

----- -- -------
Clyde E. Cutting                           Fourth Generation, Inc.
Object Technology Consultant               Galtier Plaza, Suite 430
mailto:cutting@fourthgen.com               St. Paul, MN 55101-2901
http://www.fourthgen.com/~cutting          (612) 224-5339

