🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #86534

[Xnews] - Minor Bug - Followup Window appearing suddenly [REPOST]

#86534
From: John Carlyle-Clarke
Date: Thu, 01 Nov 2001 12:49
48 lines
2822 bytes
Someone suggested that I repost this when Luu "returned", and a Google 
search shows he posted recently, so here goes.

(I actually thought this problem had gone in 4.06.22, but it hasn't.)

This may be of interest to Luu Tran.  I use Delphi and I was 
suffering from the "New Edit Window" bug, where new edit windows keep 
appearing for no apparent reason. (A search of Google Groups 
borland.public.delphi.ide for "new edit window" will reveal that it's a 
common problem).

There is a fix for Delphi by Jan Sprengers.  Here is his explanation of 
the problem:

"On some keyboards, Windows generates a WM_KEYDOWN message with a
virtual key-code of 0.  Every WM_KEYDOWN message is processed by
Delphi and it is checked if the pressed key happens to be a shortcut
for a popup menu on the window receiving the WM_KEYDOWN message.

"The problem is that the code to check for the shortcut is a bit
imprudent and also checks the shortcut against this 0 virtual
key-code.  The result is that the first menu option of the popup menu
that has *no* shortcut (in this case 'New Edit Window') is launched
because its ShortCut property has a value of 0.

"This fix filters out all WM_KEYDOWN messages with a virtual key-code
of 0 by placing a Windows hook upon installing itself in the Delphi
IDE."

I asked whether this meant that all software written in Delphi would 
have this problem and needed to be patched, and the answer was "Yes."

Jan said "... in your own applications it should be enough to override
the window procedure instead of placing a window hook like in the IDE
fix."

The relevant part is that I notice I get the same on XNews, when 
reading posts.  If you look at the popup menu, "Follow-Up and Mail 
Reply" is the first item, and I get random followup windows appearing 
when scrolling through posts.

You can see the thread at:

http://groups.google.com/groups?hl=en&th=b462a03e9c1d0a6f&seekm=3bb196d
7.5776115%40newsgroups.borland.com&frame=off

I hope this is of use!  Thanks for producing such a superb reader.
Technical Details
Message-ID: <Xns914C82530341Djohncceuroplacercouk@192.168.1.69>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!pc69.comconnect!nobody

Show Full Headers
Complete Article Headers
Message-ID: <Xns914C82530341Djohncceuroplacercouk@192.168.1.69>
Subject: [Xnews] - Minor Bug - Followup Window appearing suddenly [REPOST]
Date: Thu, 1 Nov 2001 12:49:05 +0000
From: "John Carlyle-Clarke" <john.cc@nospam.europlacer.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!pc69.comconnect!nobody
Newsgroups: news.software.readers
Organization: Europlacer
User-Agent: Xnews/4.06.22
X-Complaints-To: newsabuse@supernews.com
Lines: 47