VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



COwnMenu Make Office-style picture menus

by Kalani Thielen (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (9 Votes)

To create an "Office-style menu" (or owner-draw menu) you must register that menu item with Windows as MF_OWNERDRAW and then process the WM_MEASUREITEM and WM_DRAWITEM messages sent to the menu's parent window. The attached project file simplifies this process by encapsulating all menu drawing operations in a class called "COwnMenu" and hiding the details of working with Windows in a code module entitled "OMenu_h." With this mini-system in place, all you have to do to get owner-drawn menus in your program is call SetSubclass on the menu's owner form and RegisterMenu to set a menu item as owner drawn. The provided example project contains complete documentation.

Assumes
Support for this code is not provided, please read the documentation in the project, as you'll find the answers to most relevant questions there. The files omenu_h.bas and cownmenu.cls are meant to be included in projects which intend to include owner-draw menus.

Rate COwnMenu Make Office-style picture menus

Download COwnMenu Make Office-style picture menus

Download COwnMenu Make Office-style picture menus (11 KB)

COwnMenu Make Office-style picture menus Comments

No comments have been posted about COwnMenu Make Office-style picture menus. Why not be the first to post a comment about COwnMenu Make Office-style picture menus.

Post your comment

Subject:
Message:
0/1000 characters