Click here to Skip to main content
12,999,417 members (63,827 online)
Click here to Skip to main content


79 bookmarked
Posted 30 Jul 2000

CWindowImpl ATL Object Wizard

, 24 Apr 2001
This is an ATL Object Wizard that eases window development using CWindowImpl. It removes the redundant copy-n-paste of code between class implementations
//[!ShortName].h : Declaration of the [!ClassName]
//                                                                           //
//  This file was created using the CWindowImpl ATL Object Wizard            //
//  By Erik Thompson � 2000                                                  //
//	Version 1.1                                                              //
//  Email questions and comments to                       //
//                                                                           //
#ifndef __[!UpperShortName]_H_
#define __[!UpperShortName]_H_
#include <commctrl.h>
// [!ClassName]
class [!ClassName] : public CWindowImpl<[!ClassName]>
	[!set(WndClassType, "DECLARE_WND_CLASS")]
	[!set(WndClassName, "NULL")]
[!if=(WndClassType, "DECLARE_WND_CLASS")]
[!if=(WndClassType, "DECLARE_WND_CLASS_EX")]
		[!set(WndClassColor, "COLOR_BTNFACE")]
	[!WndClassType]([!WndClassName], [!WndClassStyle], [!WndClassColor])
[!if=(WndClassType, "DECLARE_WND_SUPERCLASS")]
		[!set(WndOrignalClassName, "TEXT(\"BUTTON\"")]
	[!WndClassType]([!WndClassName], [!WndOrignalClassName])
// Handler prototypes:
//  LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
//  LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
//  LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
	virtual ~[!ClassName]();
#endif //__[!UpperShortName]_H_

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


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


About the Author

Erik Thompson
Web Developer
United States United States
Erik lives in Redmond, Washington. He works as a Senior Software Engineer specializing in C++, COM, ATL and the middle-tier and now .NET. When he isn't coding for work, he can be found trying to extend Internet Explorer with yet another Desk band or simplifying his development process with ATL Object Wizards.

He spends his free time snowboarding, mountain biking, and online gaming.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170624.1 | Last Updated 25 Apr 2001
Article Copyright 2000 by Erik Thompson
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid