⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdcjppdlg.cpp

📁 这是一套学校设备管理系统的源码 里面有树形结构使用的很棒的方法
💻 CPP
字号:
// sdcjppdlg.cpp : implementation file
//

#include "stdafx.h"
#include "xxgl.h"
#include "sdcjppdlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// Csdcjppdlg dialog
switch_to_english_mode(CWnd *wnd);
switch_to_chinese_mode(CWnd *wnd);
Set_to_item_end(CWnd *wd,int id);


Csdcjppdlg::Csdcjppdlg(CWnd* pParent /*=NULL*/)
	: CDialog(Csdcjppdlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(Csdcjppdlg)
	m_cjpp = _T("");
	//}}AFX_DATA_INIT
}


void Csdcjppdlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(Csdcjppdlg)
	DDX_Text(pDX, IDC_EDIT1, m_cjpp);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(Csdcjppdlg, CDialog)
	//{{AFX_MSG_MAP(Csdcjppdlg)
	ON_EN_CHANGE(IDC_EDIT1, OnChangeEdit1)
	ON_EN_SETFOCUS(IDC_EDIT1, OnSetfocusEdit1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// Csdcjppdlg message handlers

void Csdcjppdlg::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 Csdcjppdlg::OnSetfocusEdit1() 
{
	// TODO: Add your control notification handler code here
   CWnd *wn;

   wn = GetDlgItem(IDC_EDIT1);
   switch_to_chinese_mode(wn);	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -