July 8th, 2008

The evolution of menu templates: Introduction

As with dialog templates, menu templates have also gone through a four-stage evolutionary process. People don’t often generate menu templates in code, although the LoadMenuIndirect function is there waiting for you once you get the urge. As a result, there aren’t many questions from people trying to generate menu templates dynamically, but I’m going to go into the history of menu templates anyway, just out of a sense of completeness.

If you’re having problems with your dynamically-generated menu templates, you can ask the resource compiler to tell you what you’re doing wrong by createing a *.rc file for it and compiling it into a scratch program. Dump the resource as bytes, and there’s your answer. Same trick we used for dialog templates.

Topics
History

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.