// CPAMDgSp.cpp : implementation file ///////////////////////////////////////////////////////////////////////////// #include "StdAfx.h" #include "EMECDgSp.hpp" #include "_Minterf.hpp" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CPA_Meca_EditorSetupDialog dialog BEGIN_MESSAGE_MAP(CPA_Meca_EditorSetupDialog, CDialog) //{{AFX_MSG_MAP(CPA_Meca_EditorSetupDialog) ON_WM_PAINT() ON_WM_LBUTTONUP() //}}AFX_MSG_MAP ON_MESSAGE(WM_HELP, OnMyHelp) END_MESSAGE_MAP() //*************************************************************************** CPA_Meca_EditorSetupDialog::CPA_Meca_EditorSetupDialog(CWnd* pParent /*=NULL*/) : CDialog(CPA_Meca_EditorSetupDialog::IDD, pParent) { //{{AFX_DATA_INIT(CPA_Meca_EditorSetupDialog) //}}AFX_DATA_INIT } //*************************************************************************** void CPA_Meca_EditorSetupDialog::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CPA_Meca_EditorSetupDialog) //}}AFX_DATA_MAP } ///////////////////////////////////////////////////////////////////////////// // CPA_Meca_EditorSetupDialog message handlers //*************************************************************************** void CPA_Meca_EditorSetupDialog::OnOK() { UpdateData(TRUE); CDialog::OnOK(); } //*************************************************************************** void CPA_Meca_EditorSetupDialog::OnLButtonUp(UINT nFlags, CPoint point) { CWnd *pclWnd; CRect crClientRect; pclWnd = GetDlgItem(IDC_RECT_TEXT_FIELD_INST); pclWnd->GetWindowRect(crClientRect); ScreenToClient(crClientRect); // if ( crClientRect.PtInRect(point) ) // if ( m_fn_bEditColor(g_colref_FieldInstanceTextColor) ) // InvalidateRect(NULL); pclWnd = GetDlgItem(IDC_RECT_BG_FIELD_INST); pclWnd->GetWindowRect(crClientRect); ScreenToClient(crClientRect); // if ( crClientRect.PtInRect(point) ) // if ( m_fn_bEditColor(g_colref_FieldInstanceBackgroundColor) ) // InvalidateRect(NULL); CDialog::OnLButtonUp(nFlags, point); } //*************************************************************************** BOOL CPA_Meca_EditorSetupDialog::m_fn_bEditColor(COLORREF &r_Color) { CColorDialog dial(r_Color, CC_FULLOPEN, this); if ( dial.DoModal() == IDOK ) { r_Color = dial.GetColor(); return TRUE; } else return FALSE; } //*************************************************************************** void CPA_Meca_EditorSetupDialog::OnPaint() { CPaintDC dc(this); // device context for painting CRect crClientRect; CWnd *pclWnd; pclWnd = GetDlgItem(IDC_RECT_TEXT_FIELD_INST); pclWnd->GetClientRect(crClientRect); crClientRect.InflateRect(-2,-2); CClientDC dc3(pclWnd); // dc3.FillSolidRect(crClientRect, g_colref_FieldInstanceTextColor); pclWnd = GetDlgItem(IDC_RECT_BG_FIELD_INST); pclWnd->GetClientRect(crClientRect); crClientRect.InflateRect(-2,-2); CClientDC dc4(pclWnd); // dc4.FillSolidRect(crClientRect, g_colref_FieldInstanceBackgroundColor); // Do not call CDialog::OnPaint() for painting messages } //*************************************************************************** long CPA_Meca_EditorSetupDialog::OnMyHelp(UINT, long lParam) { LPHELPINFO lphi = (LPHELPINFO)lParam; ::WinHelp(m_hWnd, "c:\\acp\\dllbibli\\object\\actors\\help\\actors.hlp", HELP_CONTEXTPOPUP, lphi->dwContextId); return TRUE; }