Vista Style Menus, Part 1 - Adding icons to standard menus

Windows XP introduced Visual Styles as a mechanism for providing more visual appeal to windows and controls. Menus, however, were not rendered using visual styles for Windows XP. With Windows Vista menus now are part of the visual schema and are rendered using the visual styles engine. Whenever we add new features to existing code, […]

Windows XP introduced Visual Styles as a mechanism for providing more visual appeal to windows and controls. Menus, however, were not rendered using visual styles for Windows XP. With Windows Vista menus now are part of the visual schema and are rendered using the visual styles engine.

Whenever we add new features to existing code, especially code with a long history like the Window Manager, we have to be careful not to break existing application behavior. In the context of menus there are a few situations that require us to disable visual style rendering:

· Owner-draw items (MFT_OWNERDRAW)
· Menu breaks (MFT_MENUBREAK or MFT_MENUBARBREAK)
· Use of HBMMENU_CALLBACK to defer bitmap rendering
· Using a destroyed menu handle

The reasoning for each of these may be discussed in a future blog entry. For the time being it’s only important for you to understand what may be causing your menu to render without visual styling.

Continue to read full article....

Microsoft, Windows Vista, Vista Style Menus, Guide

About The Author

Deepak Gupta is a IT & Web Consultant. He is the founder and CEO of diTii.com & DIT Technologies, where he's engaged in providing Technology Consultancy, Design and Development of Desktop, Web and Mobile applications using various tools and softwares. Sign-up for the Email for daily updates. Google+ Profile.