Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

CKCSideBannerWnd: An MFC Banner Control that Can Add a Professional-looking Feel to Most Windows...

, 6 Nov 2003
A CWnd-derived control that can attach itself to any window, without the programmer making provisions for it
Prize winner in Competition "MFC/C++ Sep 2003"
kcsidebannerwnd_demo.zip
SideBanner
Release
SideBanner.exe
res
ico00001.ico
icon1.ico
texture.bmp
SideBanner.clw
SideBanner.dsp
SideBanner.dsw
// SideBannerDlg.h : header file
//

#if !defined(AFX_SIDEBANNERDLG_H__C18B421C_857A_453B_B0C1_A9E0C991B369__INCLUDED_)
#define AFX_SIDEBANNERDLG_H__C18B421C_857A_453B_B0C1_A9E0C991B369__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "KCSideBannerWnd.h"

/////////////////////////////////////////////////////////////////////////////
// CSideBannerDlg dialog

class CSideBannerDlg : public CDialog
{
// Construction
public:
	CSideBannerDlg(CWnd* pParent = NULL);	// standard constructor
	~CSideBannerDlg();

// Dialog Data
	//{{AFX_DATA(CSideBannerDlg)
	enum { IDD = IDD_SIDEBANNER_DIALOG };
	CComboBox	m_ctlVert;
	CComboBox	m_ctlHorz;
	int		m_bFillType;
	CString	m_strCaption;
	CString	m_strTitle;
	int		m_nCapOffsetX;
	int		m_nEdgeOffsetX;
	int		m_nCapOffsetY;
	int		m_nEdgeOffsetY;
	int		m_nBannerSize;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSideBannerDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	void				SwapOffsetValues();

	HICON m_hIcon;
	CKCSideBannerWnd m_banner;
	unsigned int m_uFlags;
	HBRUSH m_hBrush;
	CFont m_fontTitle;
	CFont m_fontCaption;

	// Generated message map functions
	//{{AFX_MSG(CSideBannerDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButtonTop();
	afx_msg void OnButtonLeft();
	afx_msg void OnButtonBottom();
	afx_msg void OnButtonRight();
	afx_msg void OnChangeEditCaption();
	afx_msg void OnChangeEditTitle();
	afx_msg void OnRadioFlat();
	afx_msg void OnRadioGradient();
	afx_msg void OnChangeEditCapoffset();
	afx_msg void OnChangeEditEdgeoffset();
	afx_msg void OnChangeEditBannersize();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnStaticCol1();
	afx_msg void OnStaticCol2();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnSelchangeAlignment();
	afx_msg void OnRadioTexture();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SIDEBANNERDLG_H__C18B421C_857A_453B_B0C1_A9E0C991B369__INCLUDED_)

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)

About the Author

Peter Mares
Architect
Ireland Ireland
Peter Mares has no comment on himself. I'll let the objective humanoids do the damage Wink | ;)
He is currently developing a hobby MMO to prove that he can do it Wink | ;)

My Blog

All good things were meant to be improved
Follow on   Twitter

| Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 7 Nov 2003
Article Copyright 2003 by Peter Mares
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid