Click here to Skip to main content
15,896,207 members
Articles / Desktop Programming / Windows Forms

Cool, Semi-transparent and Shaped Dialogs with Standard Controls for Windows 2000 and Above

Rate me:
Please Sign up or sign in to vote.
4.85/5 (95 votes)
28 Sep 2012CPOL3 min read 2.9M   32.8K   350  
This article tries to find a way to show Windows standard controls on layered windows. Provides both Native MFC and WinForms source code.
// LayerDlgWithCtrlsDlg.h : header file
//

#if !defined(AFX_LAYERDLGWITHCTRLSDLG_H__FE01C186_F7CD_4E43_90D8_2E15438E8B5C__INCLUDED_)
#define AFX_LAYERDLGWITHCTRLSDLG_H__FE01C186_F7CD_4E43_90D8_2E15438E8B5C__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CLayerDlgWithCtrlsDlg dialog
#include "Src/ImgDialogBase.h"

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

// Dialog Data
	//{{AFX_DATA(CLayerDlgWithCtrlsDlg)
	enum { IDD = IDD_LAYERDLGWITHCTRLS_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

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

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CLayerDlgWithCtrlsDlg)
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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


Written By
Team Leader
China China
Jerry is from China. He was captivated by computer programming since 13 years old when first time played with Q-Basic.



  • Windows / Linux & C++
  • iOS & Obj-C
  • .Net & C#
  • Flex/Flash & ActionScript
  • HTML / CSS / Javascript
  • Gaming Server programming / video, audio processing / image & graphics


Contact: vcer(at)qq.com
Chinese Blog: http://blog.csdn.net/wangjia184

Comments and Discussions