Bobo Bitmap Menus Simplified
There are quite a few submissions on PSC demonstrating the use of ownerdrawn menus. Most are very good, I voted for them ! However, for some folks they were a bit complex and hard to understand. I hope this helps clarify the process for less experienced coders. Most professional VB programmers have been doing this for years. This submission seeks to simplify, as much as possible, the process of converting VB menus to ownerdrawn menus. No side panels, crazy fonts/colors - just the default menu with a true color icon. This small module is a cut-down version of a template I wrote a long, long time ago. I hope I haven't introduced too many bugs in the process of simplifying it, but if I have they shouldn't be too major and the concepts involved are still well demonstrated. The tasks : 1. Locate all VBmenus on a form and determine thier actual handle according to Windows 2. Change the type of each menu to 'Ownerdrawn' 3. Subclass the form so we can respond to the messages 'WM_MEASUREITEM' and 'WM_DRAWITEM' 4. Use the API to print a caption and paint an icon, either Enabled/Disabled or Checked, in response to those messages.
Shrnutí AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Upload