Click here to Skip to main content
15,881,709 members
Articles / Desktop Programming / WTL

WTL Toolbar Helper

Rate me:
Please Sign up or sign in to vote.
4.89/5 (28 votes)
11 Dec 2006CPOL9 min read 75.5K   4.1K   64  
Add text, drop-down menus, and comboboxes to a WTL toolbar.
// ToolbarHelperSampleView.h : interface of the CToolbarHelperSampleView class
//
/////////////////////////////////////////////////////////////////////////////

#pragma once

class CToolbarHelperSampleView : public CWindowImpl<CToolbarHelperSampleView>
{
public:
	DECLARE_WND_CLASS(NULL)

	COLORREF m_clr;

	CToolbarHelperSampleView();

	BOOL PreTranslateMessage(MSG* pMsg);

	BEGIN_MSG_MAP(CToolbarHelperSampleView)
		MESSAGE_HANDLER(WM_PAINT, OnPaint)
		MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkgnd)
	END_MSG_MAP()

// Handler prototypes (uncomment arguments if needed):
//	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*/)

	LRESULT OnPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnEraseBkgnd(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
};

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Comments and Discussions