Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

MsgMapper

0.00/5 (No votes)
30 May 2003 1  
A tool that might make your WTL coding work a little easier

General information

This is my first article here.

After several months' getting along with the people here, I noticed some of them find it inconvenient to write those MSG_XXXXX extended message map macros. So I hurried 3 days in front of my computer and wrote this program, which is used to generate these message maps and corresponding functions. Your can copy them to the clipboard and paste them into your code. I hope it will reduce some trouble for you before the official class wizard support for WTL.

Usage

There are four buttons named Copy1 to Copy4. Before starting, your should fill in the class edit box with your class name if you are using CPP files. Then select a macro name from the combo box, code generated will appear in the edit box as below. The functions of the four buttons are listed below:

  • Copy1 : copies the macros like MSG_XXXXX(OnXXXXX).
  • Copy1 : copies the definition used in header files when using CPP files.
  • Copy3 : copies the implementation used in CPP files.
  • Copy4 : copies the code for header files when not using CPP files.

Something I have to say

When you're going to use it, please make sure the crack.dat is in the current path. You can edit it to add new maps or fix bugs. However, as this is the first version of the app, you should keep a strict grammar as following:

OnDefaultFunctionName      //Must begin with "On"
MSG_XXXXXXX(func)          //Must be defined in crack.h
(functype)func( some variables ) 
   //by now it can only process HRESULT and void,
   //if it's a void one you can also use func(....)
.  //You can use any string that doesn't begin with "On" as a 

separator
next ones...

Any last word?

Yes, of course. Please inform me about bugs via E-mail. And, please be aware of bugs and SARS. Take care of yourself!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here