1. Images
of all menu items (for the selected outlook of the menu items
we use ready-made images, but instead of different images for
selected menus, any other indication may be used - like inverting
the image, drawing a rectangle around or else). These images
are stored in simple picture boxes. Note that as these picture
boxes are hidden at run-time, it is very important that they
have their AutoRedraw property set to True*.
2. A main
menu and some submenus created. These menus are created by Visual
Basic, we will modify the File menu later on.
3. We must
have subclassed** our main window, so that we will receive all
messages sent from Windows to our form. This way, we will be
notified by Windows when our menu needs to be drawn.
4. A module
with the declarations of all API functions, constants and types
we are going to use.
*AutoRedraw
tells VB that picture's hDC property (that we are going
to use) will contain the actual image, rather than what
is shown on screen.
** Subclassing
is explained in Using Window API in VB Tutorial available
online (vboffbeat.cjb.net)