VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Subclassed Menu

by Nigel Stratton (1 Submission)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

This code programatically creates a regular menu on a form using API's, then handles menu clicks using the SetWindowLong and CallWindowProc API's. If you add a menu item at run time you cannot access it within your regaulr code you have to subclass the menu. This shows how to do that. I have seen some submissions with the system menu but did not see one for a regular menu.

Side Effects
If you debug the program it crashes because the GUI is hooked to your app not the ide.

Rate Subclassed Menu

Download Subclassed Menu

Download Subclassed Menu (8 KB)

Subclassed Menu Comments

No comments have been posted about Subclassed Menu. Why not be the first to post a comment about Subclassed Menu.

Post your comment

Subject:
Message:
0/1000 characters