by
Frank Pitt >> Mon, 31 Jan 2000 4:16:19 GMT
G'day Brendan
This popup is a free feature regardless of having or not having any event code in the text box. It is either supplied by JADE or, more likely, by Windows itself.
Yep, it's the standard Windows edit pop-up menu.
What I want is a way, probably some windows API, which allows me to disable this freebie
The first question is, have you really thought about why do you want to do this ?
Most cases where people want to change the standard Windows operations come from poorly thought out application design.
If there is a genuine need to do this (and a user requirement is not neccessarily a genuine need, the user may need to be educated in the Windows style guidelines) then what Kevin was saying is how you would deal with it in a normal Windows application.
The problem is that Jade does not give the developer direct access to the Windows event responsible for the mouse-up Jade event, and therefore you can't do it the way a normal Windows programmer would, which is to consume the event, and preventing it from being passed on to the default handler. The mouse-up method is called by that handler, but provides no way of returning a "event handled" code to Windows.
Frankly, without knowing how (or even if) you can get Windows to call you back in a Jade method I can't think of a way of solving this problem. I have some ideas, based on what you do to get around the same limitation in Visual Basic, but I don't know if they'll work
If you have access to MSDN and the time to play, do a search on
"HOWTO: Build a Windows Message Handler with AddressOf in VB"
The reference
"HOWTO: Suppress Default Pop-up Menu When Using Custom Menu"
shows that VB programmers have the same problem though !
This is the sort of reason why people still develop applications in C++ and C <grin>
Oh, if all you want is to prevent it from happening while other processing is going on, disableEvents may help.
_____________________________________
Frank Pitt
Mentor / Consultant
Software Education Associates Ltd
Cnr The Esplanade & Nevis St, Petone
Wellington New Zealand
Voice +64 4 568 7806 Fax +64 4 568 7920
Email
frankp@softed.com
Web
http://www.softed.com