Changing the color of Windows controls gives them a fancy look and feel.The magazine CDs etc give some  free wares like mp3 players,video cutters etc to us.
hope most of them noted their amazing colors.. like magenta,violet etc.. 🙂
how can we change the usual colors and shape of dialog?

🙂

Create one Dialog based application.

This can be done in MFC by using simple codes.

hope this code will definitely help you.

// CTestColorDlg dialog

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

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

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

// Implementation
protected:
HICON m_hIcon;
CBrush m_brush;

// Generated message map functions
//{{AFX_MSG(CTestColorDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

Then, add this line in the OnInitDialog function
/////////////////////////////////////////////////////////////////////////////
// CTestColorDlg message handlers

BOOL CTestColorDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// Set the icon for this dialog.  The framework does this automatically
//  when the application’s main window is not a dialog
SetIcon(m_hIcon, TRUE);            // Set big icon
SetIcon(m_hIcon, FALSE);        // Set small icon

// TODO: Add extra initialization here
m_brush.CreateSolidBrush(RGB(255, 0, 255));
CRect rect;
GetWindowRect(&rect);
int w = rect.Width();
int h = rect.Height();

CRgn rgn1;

rgn1.CreateEllipticRgn(1, 1, w, h/2 + 30);
SetWindowRgn(static_cast<HRGN>(rgn1.GetSafeHandle()), TRUE);
rgn1.Detach();

return TRUE;  // return TRUE  unless you set the focus to a control
}

Then, add the windows Message Handler WM_CTLCOLOR and add the following line.

HBRUSH CTestColorDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);

// TODO: Change any attributes of the DC here

hbr = m_brush;
return hbr;

}

🙂
Just compile and go..
use one anti glare screen in front of the monitor.. 🙂
hows that..?? 🙂

“No one is perfect until you fall in love with them!”

for https://vctipsplusplus.wordpress.com/

BijU