Click here to Skip to main content
15,896,111 members
Articles / Programming Languages / Visual C++ 9.0

StyleDialog - A transparent dialog class with an optional custom frame

Rate me:
Please Sign up or sign in to vote.
4.84/5 (21 votes)
3 Aug 2008CPOL6 min read 74.6K   10K   95  
StyleDialog may be used independently or in conjunction with the Style Toolkit.
// StyleDlgDemoDlg.h : header file
//

#pragma once

#include "./src/StyleDialog.h"

#include "./src/style.h"

// CStyleDlgDemoDlg dialog
class CStyleDlgDemoDlg : public StyleDialog
{
// Construction
public:
	CStyleDlgDemoDlg(CWnd* pParent = NULL);	// standard constructor

	void CreateFrame();
	void CreateButtons();



// Dialog Data
	enum { IDD = IDD_STYLEDLGDEMO_DIALOG };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()

public:
	CStatic m_cInnerFrame;
	afx_msg void OnBnClickedDialog3();
	StyleButton m_cDlg2Btn;
	StyleButton m_cDlg3Btn;
	afx_msg void OnBnClickedDialog2();
};

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)


Written By
Software Developer (Senior)
United States United States
I am currently working as a consultant in Southern California.

I have worked as a Hardware Engineer, Firmware Engineer, Software Engineer and Applications Engineer.

I spent 13 years in the Disk Drive industry and the last 7 working in GPS.

Comments and Discussions