TB2RightClick, Version 1.0

Zurück zur Übersicht

Datei: README.txt

TB2RightClick.pas

Delphi unit to be able to be notified of right clicks on Toolbar2000
items, e.g. to have popup menus for menu items.

Version 1.0 - always find the most current version at
http://flocke.vssd.de/prog/code/pascal/tb2rclk/

Copyright (C) 2006 Volker Siebert <flocke@vssd.de>
All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

---------------------------------------------------------------------------

Delphi versions: 5, 6, 7, 2005, and 2006.
Verified Toolbar2000 versions: 2.1.7

Someone asked if it was able to assign a PopupMenu to individual Toolbar2000
items. Since they are not really visible controls, this is not possible.

If you capture the WM_RBUTTONDOWN or WM_CONTEXTMENU of the toolbar itself,
it only fires for clicks on the toolbar directly and not on items in popup
menus.

The included unit works around this by hooking all WM_RBUTTONDOWN messages
via a WH_GETMESSAGE message hook and posts an application defined message
to the toolbar's owner form.

See the included sample application for how to use this unit.
Flocke's Garage
Valid HTML 4.01 Transitional Valid CSS!
(C) 2005-2018 Volker Siebert.
Creative Commons-LizenzvertragDer gesamte Inhalt dieser Webseite steht unter einer Creative Commons-Lizenz (sofern nicht anders angegeben).