January 17, 2004

VS.NET Useful WTL Macros

Programmers Notepad 2 is developed using the Windows Template Library which is a library of code that makes working with Windows easier (amongst other things). WTL supports message maps which MFC users will also be aware of - basically a block of macros that direct incoming window messages to multiple handler functions. Working with message maps in WTL can be a bit of a bind as there is less good IDE support and I don't use the message-specific crackers in PN2. Therefore, I use a couple of macros to fill out notification, command and message handler prototypes for me:

Get: WTLMacros.vb which uses CleverStuff.vb to manage Undo state.

I hope someone else finds these macros useful. To try one out, simply type something like:

OnInitDialog

and then run the MessageHandler macro (if the code is not all in one file, run the MessageHandlerDefinition macro in the header, and the MessageHandler macro in the source file).

Posted by Simon at January 17, 2004 03:59 PM | TrackBack
Feedback

Read more in Feedback on scenario #1 and the meta-crap challenge »
Trackbacked from Riding Herd Feb 20, 2004 6:31 AM