BlockNameDlg.cpp
资源名称:suplib.rar [点击查看]
上传用户:mica555
上传日期:2014-05-08
资源大小:68k
文件大小:3k
源码类别:
CAD
开发平台:
Visual C++
- //-----------------------------------------------------------------------------
- //----- BlockNameDlg.cpp : implementation file
- #include "StdAfx.h"
- #include "StdArx.h"
- #include "resource.h"
- #include "BlockNameDlg.h"
- //-----------------------------------------------------------------------------
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- //-----------------------------------------------------------------------------
- IMPLEMENT_DYNAMIC (BlockNameDlg, CAcUiDialog)
- BEGIN_MESSAGE_MAP(BlockNameDlg, CAcUiDialog)
- //{{AFX_MSG_MAP(BlockNameDlg)
- ON_MESSAGE(WM_ACAD_KEEPFOCUS, OnAcadKeepFocus) // Needed for modeless dialog.
- ON_EN_KILLFOCUS(IDC_NEW_NAME, OnKillfocusNewName)
- ON_EN_SETFOCUS(IDC_NEW_NAME, OnSetfocusNewName)
- ON_EN_CHANGE(IDC_NEW_NAME, OnChangeNewName)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- //-----------------------------------------------------------------------------
- BlockNameDlg::BlockNameDlg (CWnd* pParent /*=NULL*/, HINSTANCE hInstance /*=NULL*/)
- : CAcUiDialog (BlockNameDlg::IDD, pParent, hInstance)
- {
- //{{AFX_DATA_INIT(BlockNameDlg)
- //}}AFX_DATA_INIT
- }
- void BlockNameDlg::DoDataExchange (CDataExchange *pDX) {
- CAcUiDialog::DoDataExchange (pDX) ;
- //{{AFX_DATA_MAP(BlockNameDlg)
- DDX_Control(pDX, IDC_NEW_NAME, m_ctrl_new_name);
- DDX_Control(pDX, IDC_OLD_NAME, m_ctrl_old_name);
- //}}AFX_DATA_MAP
- }
- // Needed for modeless dialogs to keep focus.
- // Return FALSE to not keep the focus, return TRUE to keep the focus
- LONG BlockNameDlg::OnAcadKeepFocus(UINT, UINT)
- {
- return TRUE;
- }
- //-----------------------------------------------------------------------------
- BOOL BlockNameDlg::OnInitDialog()
- {
- CAcUiDialog::OnInitDialog();
- m_ctrl_old_name.SetWindowText(LPCTSTR(g_Info.str));
- m_ctrl_new_name.SetWindowText(LPCTSTR(g_Info.str));
- GetDlgItem(IDC_OLD_NAME)->EnableWindow(0);
- GetDlgItem(IDC_NEW_NAME)->EnableWindow(1);
- // TODO: Add extra initialization here
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void BlockNameDlg::OnKillfocusNewName()
- {
- // TODO: Add your control notification handler code here
- }
- void BlockNameDlg::OnOK()
- {
- // TODO: Add extra validation here
- CAcUiDialog::OnOK();
- }
- void BlockNameDlg::OnSetfocusNewName()
- {
- // TODO: Add your control notification handler code here
- m_ctrl_new_name.SetSel(0,-1);
- }
- void BlockNameDlg::OnChangeNewName()
- {
- // TODO: If this is a RICHEDIT control, the control will not
- // send this notification unless you override the CAcUiDialog::OnInitDialog()
- // function and call CRichEditCtrl().SetEventMask()
- // with the ENM_CHANGE flag ORed into the mask.
- // TODO: Add your control notification handler code here
- }