123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- #include "stdafx.h"
- #include "ylgl.h"
- #include "ShowMsg2.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- ShowMsg2::ShowMsg2(CWnd* pParent )
- : CDialog(ShowMsg2::IDD, pParent)
- {
-
-
-
- }
- void ShowMsg2::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
-
- DDX_Control(pDX, IDCANCEL, m_btn1);
-
- }
- BEGIN_MESSAGE_MAP(ShowMsg2, CDialog)
-
- ON_WM_CTLCOLOR()
- ON_WM_LBUTTONDOWN()
-
- END_MESSAGE_MAP()
- BOOL ShowMsg2::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
-
- m_font.CreatePointFont (120, "ËÎÌå");
- m_btn1.SetFont (&m_font);
- return TRUE;
-
- }
- HBRUSH ShowMsg2::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
- {
- HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
-
-
- if(nCtlColor == CTLCOLOR_STATIC )
- {
- pDC->SetTextColor (RGB(255,0,0));
- }
-
- return hbr;
- }
- void ShowMsg2::OnLButtonDown(UINT nFlags, CPoint point)
- {
-
- SendMessage(WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(point.x, point.y));
- CDialog::OnLButtonDown(nFlags, point);
- }
|