Click here to Skip to main content
12,445,025 members (54,083 online)
Click here to Skip to main content

Stats

214K views
5.6K downloads
79 bookmarked
Posted

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
RBCWindowImpl.dll
wndImpl.ico
wndImpl.ctl
RBCWindowImpl.msi
//[!ShortName].h : Declaration of the [!ClassName]
[!crlf]
//***************************************************************************//
//                                                                           //
//  This file was created using the CWindowImpl ATL Object Wizard            //
//  By Erik Thompson � 2000                                                  //
//	Version 1.1                                                              //
//  Email questions and comments to ErikT@RadBytes.com                       //
//                                                                           //
//***************************************************************************//
[!crlf]
#ifndef __[!UpperShortName]_H_
#define __[!UpperShortName]_H_
[!crlf]
#include <commctrl.h>
[!crlf]
/////////////////////////////////////////////////////////////////////////////
// [!ClassName]
class [!ClassName] : public CWindowImpl<[!ClassName]>
{
public:
[!crlf]
[!if!(WndClassType)]
	[!set(WndClassType, "DECLARE_WND_CLASS")]
[!endif]
[!if!(WndClassName)]
	[!set(WndClassName, "NULL")]
[!endif]
[!if=(WndClassType, "DECLARE_WND_CLASS")]
	[!WndClassType]([!WndClassName])
[!endif]
[!if=(WndClassType, "DECLARE_WND_CLASS_EX")]
	[!if!(WndClassStyle)]
		[!set(WndClassStyle, "CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS")]
	[!endif]
	[!if!(WndClassColor)]
		[!set(WndClassColor, "COLOR_BTNFACE")]
	[!endif]
	[!WndClassType]([!WndClassName], [!WndClassStyle], [!WndClassColor])
[!endif]
[!if=(WndClassType, "DECLARE_WND_SUPERCLASS")]
	[!if!(WndOrignalClassName)]
		[!set(WndOrignalClassName, "TEXT(\"BUTTON\"")]
	[!endif]
	[!WndClassType]([!WndClassName], [!WndOrignalClassName])
[!endif]
[!crlf]
	BEGIN_MSG_MAP([!ClassName])
	END_MSG_MAP()
[!crlf]
// 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);
[!crlf]
	[!ClassName]();
	virtual ~[!ClassName]();
};
[!crlf]
#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.

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

Share

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...

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