]> git.saurik.com Git - apple/mdnsresponder.git/blob - Clients/ExplorerPlugin/About.cpp
mDNSResponder-87.tar.gz
[apple/mdnsresponder.git] / Clients / ExplorerPlugin / About.cpp
1 // About.cpp : implementation file
2 //
3
4 #include "stdafx.h"
5 #include "ExplorerPlugin.h"
6 #include "About.h"
7
8
9 // CAbout dialog
10
11 IMPLEMENT_DYNAMIC(CAbout, CDialog)
12 CAbout::CAbout(CWnd* pParent /*=NULL*/)
13 : CDialog(CAbout::IDD, pParent)
14 {
15 // Initialize brush with the desired background color
16 m_bkBrush.CreateSolidBrush(RGB(255, 255, 255));
17 }
18
19 CAbout::~CAbout()
20 {
21 }
22
23 void CAbout::DoDataExchange(CDataExchange* pDX)
24 {
25 CDialog::DoDataExchange(pDX);
26 DDX_Control(pDX, IDC_COMPONENT, m_componentCtrl);
27 DDX_Control(pDX, IDC_LEGAL, m_legalCtrl);
28 }
29
30
31 BEGIN_MESSAGE_MAP(CAbout, CDialog)
32 ON_WM_CTLCOLOR()
33 END_MESSAGE_MAP()
34
35
36 // CAbout message handlers
37 HBRUSH CAbout::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
38 {
39 switch (nCtlColor)
40 {
41 case CTLCOLOR_STATIC:
42
43 if ( pWnd->GetDlgCtrlID() == IDC_COMPONENT )
44 {
45 pDC->SetTextColor(RGB(64, 64, 64));
46 }
47 else
48 {
49 pDC->SetTextColor(RGB(0, 0, 0));
50 }
51
52 pDC->SetBkColor(RGB(255, 255, 255));
53 return (HBRUSH)(m_bkBrush.GetSafeHandle());
54
55 case CTLCOLOR_DLG:
56
57 return (HBRUSH)(m_bkBrush.GetSafeHandle());
58
59 default:
60
61 return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
62 }
63 }