Click here to Skip to main content
15,895,192 members
Articles / Desktop Programming / MFC

CxStatic: a CStatic control with text wrapping

Rate me:
Please Sign up or sign in to vote.
4.68/5 (15 votes)
17 Feb 20052 min read 129.2K   7.3K   59  
A CStatic control with text wrapping, color, and transparency.
// TestCxStaticDlg.h : header file
//

#if !defined(AFX_TESTCXSTATICDLG_H__53964EB8_7397_4E7E_804D_38B03D1920BD__INCLUDED_)
#define AFX_TESTCXSTATICDLG_H__53964EB8_7397_4E7E_804D_38B03D1920BD__INCLUDED_

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

#include "cxstatic/cxstatic.h"
#include "afxwin.h"



/////////////////////////////////////////////////////////////////////////////
// CTestCxStaticDlg dialog

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

// Dialog Data
	//{{AFX_DATA(CTestCxStaticDlg)
	enum { IDD = IDD_TESTCXSTATIC_DIALOG };
	
	//}}AFX_DATA

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

// Implementation
protected:
	HICON		m_hIcon;
	CxStatic	m_staFont3D;
	CxStatic	m_staTransparent;
	CxStatic	m_staBitmap;
	CxStatic	m_staText;
	CEdit		m_edbText;
	CComboBox	m_cboGradient;
	CxStatic	m_staGradient;
	CStatic		m_staDef;
	CxStatic	m_staResizeMe;
	CxStatic	m_staDragNDrop;


	void OnOK();
	void OnCancel();

	// Generated message map functions
	//{{AFX_MSG(CTestCxStaticDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnSelchangeGradientCombo();
	afx_msg void OnChangeEditText();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
	
	
};

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

#endif // !defined(AFX_TESTCXSTATICDLG_H__53964EB8_7397_4E7E_804D_38B03D1920BD__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 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


Written By
Researcher
France France
I am currently working as software engineer in a french transport company.
I am interested in C++, MFC, wxWindows and .NET environnement.

Comments and Discussions