Click here to Skip to main content
Click here to Skip to main content

Message Cracker Wizard for Win32 SDK Developers

By , 7 Mar 2005
 

Sample screenshot

Index

Introduction

The WINDOWSX.H header facilities for Win32 SDK programmers

Many beginner and intermediate programmers are often faced with the problem of spaghetti switch...case code blocks when programming with the Windows API in C/C++. When you add a lot of messages to catch in your window procedure, looking where is your e.g., WM_COMMAND or WM_CHAR, the block of code becomes a real nightmare.

The problem of the thousand lines window procedure can be solved with a header file that is shipped since the days of the C/C++ 7.0 compiler and the Windows Software Development Kit for Windows 3.1. That header is <windowsx.h> and contains a lot of useful macros. According to Microsoft, the facilities of this header file can be resumed in the following groups:

  • Stricter type checking for C programs with the STRICT macro.
  • Macros to simplify many common operations in Windows programming.
  • Control macros to simplify communication with Windows controls.
  • Message crackers (which are a convenient, portable, and type-safe method to handle messages) and their associated parameters and return values in the Windows environment.

Since Message Cracker Wizard is designed to aid with the message crackers, I will skip the other useful macros the header file makes available. If you are interested in a brief description of what you can do with the WINDOWSX.H file, you can look at the MS Knowledge Base Article #83456.

Well, let's introduce the advantages of the message crackers and, of course, why the tool offered here can be useful to work with them in your code.

When you are programming with the Win32 SDK, you process window and dialog messages with a window procedure, commonly named WndProc. It is very common in Windows C programming that the window procedure catches every window message using a switch keyword and a bunch of case labels for every message we want to catch.

Suppose that we want to process WM_COMMAND, WM_KEYUP, WM_CLOSE and WM_DESTROY for our main window. We could write a window procedure with a logic like this:

LRESULT CALLBACK MainWndProc (HWND hwnd, UINT msg, 
  WPARAM wParam, LPARAM lParam)
{
  switch(msg)
  {
    case WM_COMMAND:
    // ...
    break;
        
    case WM_KEYUP:
    // ...
    break;
            
    case WM_CLOSE:
    // ...
    break;
                
    case WM_DESTROY:
    //...
    break;
                
    default:
        return DefWindowProc(hwnd, msg, wParam, lParam);
  }
}

This is the most used manner since Windows 1.0 days to process window messages, and surely, it works. But the problem is when you begin to add more and more complex features to your program, such as MDI, OLE, common controls, etc., and you get a thousand-lines window procedure. You begin to jump with PageDn and PageUp keys looking for a message you want to modify.

This is the first advantage of using message crackers: they convert that case label spaghetti in easy to maintain handling functions, like MFC.

And the second advantage is the proper parameter format you use in your handling functions. Instead of doing those switch(LOWORD(wparam)), you can simply use switch(id) because the message function that you provide passes id as one of the "cracked" parameters, which equals to LOWORD(wparam).

The message handling macro HANDLE_MSG is defined in windowsx.h, as follows:

#define HANDLE_MSG(hwnd, message, fn) \
   case (message) : return HANDLE_##message((hwnd), (wParam), (lParam), (fn))

As you may expect from the macro definition above, to convert your code to the "message-cracked" version, you must supply the cracking macro, HANDLE_MSG, and the function to process that message. The HANDLE_MSG macro goes into the window procedure. It needs three parameters: the window handle (hwnd), the message you want to process (WM_xxxxx), and the function we'll write to process that message. To better explain, the following code in the above window procedure converted to message crackers:

LRESULT CALLBACK MainWndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
  switch(msg)
  {
    HANDLE_MSG (hwnd, WM_COMMAND, OnCommand);
    HANDLE_MSG (hwnd, WM_KEYUP,   OnKeyup);    
    HANDLE_MSG (hwnd, WM_CLOSE,   OnClose);
    HANDLE_MSG (hwnd, WM_DESTROY, OnDestroy);
    default:
        return DefWindowProc(hwnd, msg, wParam, lParam);
  }
}

Wow! This is a better, compact and easily manageable window procedure. Now you would want to define your message processing functions (OnKeyUp, OnClose, and OnDestroy). This is a real advantage, as you can jump to your message processing function with the Visual Studio IDE:

The problem is that you must search in the definitions of WINDOWSX.H header and look for the parameters of the matching message processing function every time you add a message handler, because you can't use any parameters you want: the format of the handling function is explicit. Doing this repeated searching in the header file can become a tedious task and can lead to errors. The Message Cracker Wizard Tool comes to the rescue: it allows you to paste the correct function parameters for every message handler you want. And if you're writing from scratch, it can also write a template window or dialog procedure to begin with the window messages you will process.

Message Forwarding Macros: Another XWINDOWS.H feature

Another useful feature in windowsx.h header is the possibility of message forwarding. This is used for "unpacking" the message processing function parameters into suitable WPARAM and LPARAM values to call another function that expects parameters such as PostMessage, SendMessage, CallWindowProc, etc.

Suppose that we want to use SendMessage to send a WM_COMMAND message to a parent window that "simulates" the double-clicking of a control named IDC_USERCTL by sending a notification code of BN_DBLCLK. You would normally use:

SendMessage (hwndParent, WM_COMMAND, 
           MAKEWPARAM(IDC_USERCTL, BN_DBLCLK), 
           (LPARAM)GetDlgItem(hwnd, ID_USERCTL));

This is a rather complex syntax: the SendMessage expects a WPARAM parameter where the low-order word is the control ID and the high-order word is the notification code; and LPARAM parameter is the handle to the control which we get here with the GetDlgItem API.

The above code can be converted to WINDOWSX.H message forwarding macros, FORWARD_WM_xxxxx. For each message, the forwarding macros use the same "packed" parameters as the message handling functions that Message Cracker Wizard creates, plus the function you want to call and pass the unpacked LPARAM/WPARAMs. For example, Message Cracker Wizard will generate the following function prototype for a WM_COMMAND message and a myWnd window ID:

void myWnd_OnCommand (HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)

Well, those cracked parameters are the same to be used by the forwarding macro -- so, as you may expect, the confusing SendMessage call we showed above can be reduced to:

FORWARD_WM_COMMAND (hwndParent, IDC_USERCTL, 
  GetDlgItem(hwnd, ID_USERCTL), BN_DBLCLK, SendMessage);

That's easy and works with all Message Cracker Wizard supported messages.

Using the Message Cracker Wizard Tool

When you fire up the Message Cracker Wizard, its interface appears like the following:

The Wizard offers you all the messages handled by WINDOWSX.H in the top-left list box where you can click one or multiple messages. The Window ID edit box allows you to specify an identifier for the window you are specifying the message. Common IDs are MainWnd, About (for about dialogs), etc. This will appear in both the message handling function, in the HANDLE_MSG macro, and in the name of the window/dialog procedure if you want to create one from scratch. The "Make Window Procedure" check box allows you to do that: create from scratch a window or dialog procedure with all the selected message cracker macros ready. Using this approach when beginning a Windows API project, you can cleanly write and organize your code, and of course, avoid mistakes. The two edit boxes at the bottom of the window will contain the generated code for the cracking macros and the functions to handle those messages (prototypes only). Note that the window procedure template code won't appear here when you check "Make Window Procedure": it will appear when you paste the code to your C++ editor only by clicking "Copy Macro".

To quickly tour the features of the Message Cracker Wizard Tool, let's do it by example. Remember that you must include the <windowsx.h> header with your project using the #include <windowsx.h> directive in your .C / .CPP file.

Quick tour on the Message Cracker Wizard Features

Let's begin. Suppose you've already written your WinMain basic code: you've successfully filled the WNDCLASS structure, registered the window, and wrote a functioning message loop. Now you need a window procedure for your main window.

Open the Message Cracker Wizard. We need to select messages for our window, because MCW needs it to create our main window procedure from scratch. As you may know, it is very common for Windows programs to handle the WM_CLOSE, WM_DESTROY and WM_CREATE messages, so let's build the window procedure with message crackers for those messages. After that, we'll also build the body of the message processing functions for that window procedure.

Select WM_CLOSE, WM_DESTROY and WM_CREATE in the list box. As this window will be the main window of our program, go the Window ID and type main. This is a window ID that identifies your window/dialog and is put as suffix in cracking macros and processing functions. Of course, you'll want to maintain it consistent for all the message handling of a particular window. Look at the bottom edit boxes. They show the HANDLE_MSG cracker macro and the related prototypes of the message processing functions.

But wait... we said that we want a ready window procedure. So click on 'Make Window Procedure' check box, and be sure that Window radio button is selected. Now we are ready. Keep in mind that Dialog works just like this, but modifies the procedure to be a dialog-type procedure.

First, we need the window procedure on our source code. Press on the 'Copy Macro' button (or press Ctrl-M), minimize the Wizard (or keep it at hand, since it remains top-most), go to your IDE and paste from the clipboard (Ctrl-V) in the place you want your window procedure. Voilá! You will get code like this:

//
// main  Window Procedure
//
LRESULT CALLBACK main_WndProc (HWND hwnd, UINT msg, WPARAM wParam, 
  LPARAM lParam)
{
  switch(msg)
  {
    HANDLE_MSG (hwnd, WM_CLOSE, main_OnClose);
    HANDLE_MSG (hwnd, WM_CREATE, main_OnCreate);
    HANDLE_MSG (hwnd, WM_DESTROY, main_OnDestroy);

      //// TODO: Add window message crackers here...

  default: return DefWindowProc (hwnd, msg, wParam, lParam);
  }
}

That's the window procedure with the three message cracking macros ready to work! And also, with a TODO comment to remember that you must add new message cracker macros there. Remember to unselect 'Make Window Procedure' checkbox when you want to add a HANDLE_MSG macro to the window procedure.

But the code above does nothing, because we need the functions that process those three messages we want. Simply return to the Message Cracker Wizard tool and now click on 'Copy Function' button. Switch to your source code, locate your cursor where you want the functions bodies to be inserted, and paste with Ctrl+V or Edit/Paste menu. The wizard automatically creates the functions with the main Window ID and the correct parameters expected by the WINDOWSX.H header macros:

//
//  Process WM_CLOSE message for window/dialog: main
//
void main_OnClose(HWND hwnd)
{
  // TODO: Add your message processing code here...
}

//
//  Process WM_CREATE message for window/dialog: main
//
BOOL main_OnCreate(HWND hwnd, LPCREATESTRUCT lpCreateStruct)
{
  // TODO: Add your message processing code here...
}

//
//  Process WM_DESTROY message for window/dialog: main
//
void main_OnDestroy(HWND hwnd)
{
  // TODO: Add your message processing code here...
}

The Wizard also automatically creates a heading comment and a TODO line to remind you to add code. Now you can add your message handling and processing logic easily and write complex window procedures. You can remove the comments if you want using the two checkboxes in the main window.

More Message Cracker Wizard Features

There are a few more features present in the program, which are rather intuitive.

Message Filtering

This was a suggestion by some users of the program and it was implemented. Click on "Filters.." button (or press Ctrl+L) and you get the following dialog box. There you can select which messages appear listed on the listbox, classified on the type (this classification criteria was taken from Microsoft Spy++ utility).

Note that a present issue in v2.0 when using message filtering dialog is that the list box is filled up again when you click OK, so the previous selection is lost (this does not mean that your previous selected messages that appear on the target code window will disappear).

Compact Window Mode

You may want to reduce the window size of the Message Cracker Wizard. This is possible by disabling "Show Target Code" option in the View menu (or by pressing Ctrl+F11). The main window will appear without the target code area:

Window Transparency, Exclude Comments and Stay On Top

Another feature that can be useful for low resolution displays or cluttered desktops is the window transparency feature. Click on the View menu, Window Transparency menu and select a transparency percentage (Solid is 100% opaque and 75% is 25% opaque). This feature is only available for Windows 2000/XP and Server 2003 users. On 9X OSes, only "Solid" option is available.

The Exclude Comments feature allows the code generator to exclude comments, either heading or "TODO" style commenting. Just select or unselect the checkboxes on the main window.

Finally, the Stay On Top feature is pretty self-descriptive.

Planned Features

The following features may appear in the following releases:

  • Help file.
  • Integrated Help for every message cracker parameter and message.
  • WTL support! :)
  • Window ID and settings save (this may be implemented in next 2.x).
  • Per-Project settings and "message-mappings" (a la MFC) (this also may be implemented in a later 2.5 release).

Have fun and good programming!

I hope this little tool to be of interest to any Windows SDK programmer and of course, to be a potential method to write cleaner Win32 API programs. I'm open to suggestions to improve the tool. If you find this program useful, mail me, because I will be very happy to listen to any good comment.

Thanks for all support!! You know who you are!

As always, check my home page where I mention the updates to this program.

History

  • 1.0
    • First release, Sep, 2003.
  • 1.2
    • Added multiple selection feature!!
    • Added missing crackers for WM_COPYDATA and WM_HOTKEY messages.
    • Fixed little interface bugs.
  • 2.0
    • Added message filtering.
    • Added window transparency option (only for Windows 2000/XP/Server 2003).
    • Added show/hide Target code.
    • Added enable/disable stay on top window.
    • Added WM_CTLCOLORxxxx message support.
    • Added message-type bitmaps on list box.
    • Added include/exclude comments option.
    • Fixed keyboard logic.
  • 2.1
    • Fixed clipboard copy bug (thanks to Agnel Kurian).
    • Now the program is licensed under the GPL.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

About the Author

Hernán Di Pietro
Software Developer Nektra S.A
Argentina Argentina
Started with the Commodore 64 in 1986, programming BASIC.
In 1990, with the first 8086 PC, started programming in QB 4.x.
Moved to Visual Basic in 1995-1996.
Started with C++ a at the age of 23.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
Generalthanks a lot~ PinmemberCrazyNPC15-Feb-10 17:45 
thanks a lot~ Laugh | :laugh:
Generalexcelente! Pinmemberalejandro29A8-Apr-09 4:50 
excelente hernán!
yo también soy de argentina (rosario) y programo en C/C++ en el trabajo.
ya conocia windowsx.h pero el programita ayuda muchisimo!
si querés agendar mi mail de gmail es "hav29a"
saludos!
 
Dios existe pero duerme...
Sus pesadillas son nuestra existencia.
(Ernesto Sabato)

GeneralRe: excelente! PinmemberHernán Di Pietro8-Apr-09 7:49 
GeneralRe: excelente! Pinmemberalejandro29A8-Apr-09 7:55 
GeneralRe: excelente! Pinmemberrioritta9-May-09 8:52 
Generalthanks with best regards Pinmembermhdbsm18-Sep-08 12:24 
thank you a alot
bassam
 
Thanks For Allah

GeneralGreat Tool! Thanks! Pinmemberhoctro30-May-08 20:16 
Thanks! Very useful code! Also a beautiful example of how to code Win32 with DialogBox as opposed to coding as SDI (from the first chapters of the Pretzol book)!
 
Cheers!
Generalsimulating control "clicked" msgs Pinmemberyuban27-Apr-07 11:00 
Thanks a million for providing the format used when a control sends a message when clicked. Hard to believe that MSDN doesn't put this somewhere easy to find.
 
- yuban
GeneralCode does not compile !! PinmemberSreekanth Muralidharan4-Dec-05 20:24 
Hi
It was a great information. But I used the following code for implementing your message handler:
// TestDialog
//
 
#include
#include
#include "TestDialog_res.h"
#define WM_NOTIFYICON WM_USER+100
 
void OnWM_NOTIFYICON(WPARAM wParam, LPARAM lParam);
#define HANDLE_MSG(hwnd, message, fn) \
case (message) : return On##message((hwnd), (wParam), (lParam), (fn))
 

// On_MYWM_NOTIFYICON
LRESULT CALLBACK MainDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
 
HINSTANCE hInstance;
 

// WinMain
 
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
{
hInstance=hInst;
InitCommonControls();
DialogBox(hInstance, (LPCTSTR)IDD_MAINWINDOW, HWND_DESKTOP, (DLGPROC)MainDlgProc);
 
return 0;
}
 
// MainDlgProc
 
LRESULT CALLBACK MainDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
{

HANDLE_MSG(hDlg,(WPARAM)WM_NOTIFYICON,OnWM_NOTIFYICON);
 
RECT r, r2;
GetWindowRect(hDlg,&r);
GetWindowRect(GetDesktopWindow(),&r2);
HICON hMyIcon = LoadIcon(hInstance,MAKEINTRESOURCE(IDI_ICON1));
MoveWindow(hDlg,(r2.right/2)-((r.right-r.left)/2),(r2.bottom/2)-((r.bottom-r.top)/2),r.right-r.left,r.bottom-r.top,TRUE);

NOTIFYICONDATA trayIconData;
trayIconData.hWnd = NULL;
trayIconData.uID = IDI_ICON1;
trayIconData.uFlags = NIF_ICON | NIF_TIP;
trayIconData.uCallbackMessage = WM_NOTIFYICON;
trayIconData.hIcon = hMyIcon;
strcat(trayIconData.szTip,"My Cute Icon");
trayIconData.cbSize = sizeof(trayIconData);
Shell_NotifyIcon(NIM_ADD,&trayIconData);
break;
}
 
case WM_COMMAND:
{
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
}
return FALSE;
}
 
void OnWM_NOTIFYICON(WPARAM wParam, LPARAM lParam)
{
UINT uMouseEvent;
UINT uID;
uID = (UINT) wParam;
uMouseEvent = (UINT)lParam;
if(uMouseEvent == WM_LBUTTONDOWN)
{
switch(uID)
{
case IDI_ICON1:
MessageBox(NULL,"Click!!","Click!!",MB_OK);
break;
}
}


}

 
I use GCC with Win32 SDK installed.
Compiler gives the following error:
1. Pasting "On" and "(" does not give a valid preprocessing token
2. "On" undeclared
 
Please help !!
Regards
 
Sreekanth Muralidharan,
Corporate Systems Consultant [Embedded Systems],
INDIA
QuestionHow can I get more information about message cracker Pinmembernetpole29-May-05 3:32 
Where can I down MS SDK V3.1, I can't find it in MS.
 
foraway!
 
-- modified at 7:23 Tuesday 11th October, 2005
GeneralMany thanks Pinmemberxaverbirrer4-May-05 22:41 
Good work Blush | :O
QuestionWhere is the input focus? PinmemberFree to Go21-Mar-05 9:42 
Pls help!
 
I am interested in knowing whether there is any chances to locate the "keyboard cursor" location. Finding the top most window is not difficult but I have no idea which control within a child window that got the keyboard focus nor where is the keyboard cursor location.
 
I wonder whether you have any ideas on
1) which child windows got the keyboard focus,
2) which control within this child window got the keyboard focus and
3) where is the exact location (x,y) the input cursor or keyboard cursor is
 

 
Regards,
 
Joe

Generalsweet PinmemberJeremy Falcon9-Mar-05 19:47 
I didn't think many people were still using the message cracker macros. I still prefer straight Win32 over MFC for a lot of tasks.
 
Thanks for the tool. I'll definitely be putting it to use.
 
Jeremy Falcon
GeneralPrototypes and new freatures Pinmemberchristof.k5-Oct-04 0:37 
Hello!
 
Thanks for that tool...it is REALLY helpful.
 
Some comments:
 
-Do you have an idea when the new features will be available (Version 2.5)?
 
-Message WM_HELP is missing
-Can you add a button to produce the list of prototypes so that they can be easily included into the header files?
 
Thanks once more
Christof
GeneralRe: Prototypes and new freatures PinmemberHernán Di Pietro5-Oct-04 18:06 
GeneralRe: Prototypes and new freatures PinmemberHernán Di Pietro14-Oct-04 16:16 
QuestionPossible Bug!? Pinmembermubi9921-Sep-04 1:54 
Hey Hernán,
 
Big Grin | :-D Excellent tool!
 
Just one small possible bug?! I'm using version 2.0 downloaded from your home page..
 
Going through the example in your article, I selected the three messages
  • WM_CLOSE
  • WM_CREATE
  • WM_DESTROY
My Windows ID is main. When Make Windows Procedure is unchecked things are fine, using Copy Macro gives:
HANDLE_MSG (hwnd, WM_CLOSE, main_OnClose);
HANDLE_MSG (hwnd, WM_CREATE, main_OnCreate);
HANDLE_MSG (hwnd, WM_DESTROY, main_OnDestroy);
However, when I checked the Make Windows Procedure checkbox, and then I use Copy Macro, I get:
//
// main  Window Procedure
//
LRESULT CALLBACK main_WndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
	switch(msg)
	{
		HANDLE_MSG (hwnd, WM_CLOSE, main_OnClose);
HANDLE_MSG (hwnd, WM_CREATE, main_OnCreate);
HANDLE_MSG (hwnd, WM_DESTROY, main_OnDestroy);
 
		HANDLE_MSG (hwnd, WM_CREATE, main_OnCreate);HANDLE_MSG (hwnd, WM_CREATE, main_OnCreate);
HANDLE_MSG (hwnd, WM_DESTROY, main_OnDestroy);
 
		HANDLE_MSG (hwnd, WM_DESTROY, main_OnDestroy);NDLE_MSG (hwnd, WM_CREATE, main_OnCreate);
HANDLE_MSG (hwnd, WM_DESTROY, main_OnDestroy);
 

			//// TODO: Add window message crackers here...

	default: return DefWindowProc (hwnd, msg, wParam, lParam);
	}
}
It looked to me there was some buffer mesing-up going on. So I tried to restart the program, but I had exacly the same problem...
 
I'm using Windows 2000 (SP4), my texti editor is Notepad! I don't have MS-VC++, I use Pelles C with Win32 SDK....
 
Big Grin | :-D Keep up the good work!!
 
---
Cheers
mubi
ClearGulf.com :: Clear Custom Coding, Development and Consulting - C, Perl, PHP, SQL
GeneralRe: Source Code Doesn't Run PinmemberHernán Di Pietro29-Jul-04 13:31 
GeneralRe: Source Code Doesn't Run PinmemberDave Brighton29-Jul-04 14:54 
GeneralRe: Source Code Doesn't Run PinmemberHernán Di Pietro29-Jul-04 15:20 
GeneralVery Good.... PinmemberPerfectDark1-Oct-03 11:31 
Hi Hernán!
 
I've just got around to trying version 2! (very busy at workCry | :(( ).
 
I really like the new features you've added with this version, they make it a very nice tool to use!
 
Keep up the Good work!
 
PDRoll eyes | :rolleyes:
GeneralReaders who see blurred images PineditorNishant S25-Sep-03 0:58 
Please hit Ctrl-Refresh to update your browser cache; (some of the images have been updated)
 
Thanks
Nish
 

Extending MFC Applications with the .NET Framework [NW] (coming soon...)
Summer Love and Some more Cricket [NW] (My first novel)
Shog's review of SLASMC [NW]
Come with me if you want to live

GeneralNew Message Cracker Wizard 2.0 at HDP Tools PinmemberHernán Di Pietro20-Sep-03 15:49 
Message Cracker Wizard 2.0 is available!
 
Big Grin | :-D
 
In response of all good comments received about my program in this site... new version of MCW (2.0) is at my home page.
 
The Codeproject article will be updated in the next days.
Stay tuned up and as always, send comments and suggestions, and if you actually are using the program.
 
Thanks for the support. Wink | ;)
 
Hernan Di Pietro.

 
visit me at
http://usuarios.lycos.es/hernandp
GeneralHernan good work PinmemberCarlos Antollini16-Sep-03 10:38 
Hernan,
You are welcome to codeproject world.
It's nice for me to know other Argentinian boy here...
 
Best Regards
Un abrazo

 
Carlos Antollini.
Pi Five[^]Creator
 
Sonork ID 100.10529 cantollini
GeneralRe: Hernan good work PinmemberHernán Di Pietro16-Sep-03 20:33 
GeneralMCW Tool - Version 2.0 Coming Full o'features! PinmemberHernán Di Pietro15-Sep-03 16:40 
Hi, all MCW users and supporters Wink | ;)
 
The MCW Tool V2.0 will be released the next week packed with a lot of new features.
The already implemented and under testing are the following:
 
+ added WM_CTLCOLORxxx message crackers
+ added show/hide target code
+ added enable/disable stay on top
+ added window transparency options for 2000/XP
+ added message filter
+ added bitmaps on list box and combo box
+ fixed keyboard logic and tab stops

 
Features that may appear either in 2.0 or 2.x+ versions (depends on users suggestions, feedback and development/debugging time):

+ toolbar "compact" mode
+ window ID "MRU"
+ small Help window for every WM_ message

 
Features that may appear at later versions (2.5 or 3.0)

+ Support for more message crackers WINDOWSX.H does not include
+ WTL Support! Big Grin | :-D
+ Full communication with VC++ editor

 
I'm listening suggestions! Big Grin | :-D
 
Hernan Di Pietro.
THANKS TO ALL THAT RECOMMENDED IMPROVEMENTS!Big Grin | :-D Big Grin | :-D

 
visit me at
http://usuarios.lycos.es/hernandp
GeneralWTL Support for MCW PinmemberHernán Di Pietro13-Sep-03 12:18 
Can anyone send me a sample with the messaging structure of WTL?
 
e.g When you want to process WM_COMMAND, which code I should generate?
 
I could add WTL Support to the tool..

GeneralRe: WTL Support for MCW PinsitebuilderMichael Dunn13-Sep-03 15:06 
QuestionSupport for WTL? PinsussAnonymous10-Sep-03 16:13 

Any chance of also supporting WTL with your Wizard?
 
WTL has macros cracking the various messages, but I hate
constantly referencing the macro header files. Lousy
memory I guess.
 
An adaption of your wizard would be huge!
Keep up the great work!

AnswerRe: Support for WTL? PinmemberHernán Di Pietro10-Sep-03 16:42 
Generalvery useful.... PinmemberPerfectDark10-Sep-03 13:43 
I use message crackers quite a bit, and I'm always having to look in the header file for the prototypes of functions - This will save me loads of time. a very nice little utility.
 
Thank you.
 
ps.
 
I think a useful feature would be to be able to filter the message list - so if I just what mouse messages I could just display those. Loot at the spy++ tool that comes with Visual Studio. goto "file menu"->"log messages menu"->"messages tab" thats the sort of thing i mean. that would be handy.
 
keep up the good work.
 

GeneralRe: very useful.... PinmemberHernán Di Pietro10-Sep-03 15:28 
GeneralRe: very useful.... PinmemberPerfectDark11-Sep-03 12:58 
GeneralRe: very useful.... (New Features Coming Soon) PinmemberHernán Di Pietro15-Sep-03 12:50 
GeneralRe: very useful.... (New Features Coming Soon) PinmemberPerfectDark16-Sep-03 9:38 
GeneralRe: very useful.... (New Features Coming Soon) PinmemberHernán Di Pietro16-Sep-03 15:02 
GeneralRe: very useful.... (New Features Coming Soon) PinmemberHernán Di Pietro25-Sep-03 16:03 
QuestionWhat type of project is this??? PinmemberStuart Wininger10-Sep-03 6:49 
I just downloaded the code, however could NOT find the project file. I am using Visual C++ 6.0, otherwise tool looks nice.D'Oh! | :doh:
 
Save the wee turtles...
AnswerRe: What type of project is this??? PinmemberHernán Di Pietro10-Sep-03 7:34 
AnswerRe: What type of project is this??? PinsussAnonymous6-Mar-05 21:05 
Generallooks good Pinmemberfilthy mcnasty9-Sep-03 15:00 
nice job on this one =)
GeneralSweet :-) PinmemberRichard Hein9-Sep-03 9:41 
Thanks for the great tool - and for telling me that these macros exist in the first place!
 
Here's a suggestion for future versions: Enable multiple selection of the messages you want to handle, and have another Target Code Window that combines the whole thing together (Macros and Functions). It would just save some more time.
 
Really great stuff. Big Grin | :-D
 
Richard A. Hein
http://www.levelplatforms.com
Generalthat's a good suggestion! PinmemberHernán Di Pietro9-Sep-03 11:38 
GeneralRe: that's a good suggestion! PinmemberHernán Di Pietro9-Sep-03 21:21 
GeneralRe: that's a good suggestion! PinmemberRichard Hein10-Sep-03 3:47 
Generalexcellent work Pinmemberdang!9-Sep-03 0:55 
what more can i say!
 
regards

 
dang!
 
AbstractSpoon (subscribe)
Generalthanks! PinmemberHernán Di Pietro9-Sep-03 6:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web02 | 2.6.130619.1 | Last Updated 8 Mar 2005
Article Copyright 2003 by Hernán Di Pietro
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid