📄 sdghdwdlg.cpp
字号:
// sdghdwdlg.cpp : implementation file
//
#include "stdafx.h"
#include "xxgl.h"
#include "sdghdwdlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Csdghdwdlg dialog
switch_to_english_mode(CWnd *wnd);
switch_to_chinese_mode(CWnd *wnd);
Set_to_item_end(CWnd *wd,int id);
Csdghdwdlg::Csdghdwdlg(CWnd* pParent /*=NULL*/)
: CDialog(Csdghdwdlg::IDD, pParent)
{
//{{AFX_DATA_INIT(Csdghdwdlg)
m_ghdw = _T("");
//}}AFX_DATA_INIT
}
void Csdghdwdlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Csdghdwdlg)
DDX_Text(pDX, IDC_EDIT1, m_ghdw);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Csdghdwdlg, CDialog)
//{{AFX_MSG_MAP(Csdghdwdlg)
ON_EN_CHANGE(IDC_EDIT1, OnChangeEdit1)
ON_EN_SETFOCUS(IDC_EDIT1, OnSetfocusEdit1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Csdghdwdlg message handlers
void Csdghdwdlg::OnChangeEdit1()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
char buf[50];
GetDlgItemText(IDC_EDIT1,buf,50);
if (strlen(buf) > 20){
buf[20] = 0;
SetDlgItemText(IDC_EDIT1,buf);
Set_to_item_end(this,IDC_EDIT1);
}
}
void Csdghdwdlg::OnSetfocusEdit1()
{
// TODO: Add your control notification handler code here
CWnd *wnd;
wnd = GetDlgItem(IDC_EDIT1);
switch_to_chinese_mode(wnd);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -