How to popup a menu as the mouse moves over a hotspot
This sample is sort of a combination of the PopHwnd and CoolTool samples.
It destroys and pops up menus as the mouse moves over a hotspot on a "toolbar".
The application is hooked before PopupMenu is called so that the handle (and thus the RECT) of the
new popup menu can be obtained.
Uses the following API functions:
- CallNextHookEx
- CallWindowProc
- CopyMemory (RtlMoveMemory)
- GetCursorPos
- GetWindowRect
- PtInRect
- ScreenToClient
- SetWindowsHookEx
- SetWindowLong
- UnHookWindowsHookEx
Back to Code Samples
Copyright © 2000 by Matt E. Hart, All Rights Reserved Worldwide.
Nothing on this web site may be reproduced, in any form, without express written consent.