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

📄 sdghdw.cpp

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

#include "stdafx.h"
#include "xxgl.h"
#include "sdghdw.h"

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

/////////////////////////////////////////////////////////////////////////////
// Csdghdw dialog

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

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


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


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

/////////////////////////////////////////////////////////////////////////////
// Csdghdw message handlers

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