]> git.saurik.com Git - apple/mdnsresponder.git/blobdiff - Clients/ExplorerPlugin/About.cpp
mDNSResponder-87.tar.gz
[apple/mdnsresponder.git] / Clients / ExplorerPlugin / About.cpp
diff --git a/Clients/ExplorerPlugin/About.cpp b/Clients/ExplorerPlugin/About.cpp
new file mode 100644 (file)
index 0000000..37d3281
--- /dev/null
@@ -0,0 +1,63 @@
+// About.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "ExplorerPlugin.h"
+#include "About.h"
+
+
+// CAbout dialog
+
+IMPLEMENT_DYNAMIC(CAbout, CDialog)
+CAbout::CAbout(CWnd* pParent /*=NULL*/)
+       : CDialog(CAbout::IDD, pParent)
+{
+       // Initialize brush with the desired background color
+       m_bkBrush.CreateSolidBrush(RGB(255, 255, 255));
+}
+
+CAbout::~CAbout()
+{
+}
+
+void CAbout::DoDataExchange(CDataExchange* pDX)
+{
+       CDialog::DoDataExchange(pDX);
+       DDX_Control(pDX, IDC_COMPONENT, m_componentCtrl);
+       DDX_Control(pDX, IDC_LEGAL, m_legalCtrl);
+}
+
+
+BEGIN_MESSAGE_MAP(CAbout, CDialog)
+ON_WM_CTLCOLOR()
+END_MESSAGE_MAP()
+
+
+// CAbout message handlers
+HBRUSH CAbout::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
+{ 
+       switch (nCtlColor)
+       {
+               case CTLCOLOR_STATIC:
+       
+                       if ( pWnd->GetDlgCtrlID() == IDC_COMPONENT )
+                       {
+                               pDC->SetTextColor(RGB(64, 64, 64));
+                       }
+                       else
+                       {
+                               pDC->SetTextColor(RGB(0, 0, 0));
+                       }
+
+                       pDC->SetBkColor(RGB(255, 255, 255));
+                       return (HBRUSH)(m_bkBrush.GetSafeHandle());
+
+               case CTLCOLOR_DLG:
+       
+                       return (HBRUSH)(m_bkBrush.GetSafeHandle());
+
+               default:
+       
+                       return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
+       }
+}