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

📄 sdsbmcdlg.cpp

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

#include "stdafx.h"
#include "xxgl.h"
#include "sdsbmcdlg.h"

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

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

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


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


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

/////////////////////////////////////////////////////////////////////////////
// Csdsbmcdlg message handlers

void Csdsbmcdlg::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) > 40){
		buf[40] = 0;
		SetDlgItemText(IDC_EDIT1,buf);
        Set_to_item_end(this,IDC_EDIT1);
    }
	
}

void Csdsbmcdlg::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 + -