VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Subclassed Menu

Nigel Stratton  (1 Submission)   Windows API Call/Explanation   Visual Basic 5.0   Intermediate   Wed 3rd February 2021

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 (5(5 Vote))

Download Subclassed Menu

Subclassed Menu Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters