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

📄 srf.cpp

📁 这是一套学校设备管理系统的源码 里面有树形结构使用的很棒的方法
💻 CPP
字号:
 #include "stdafx.h"
#include "string.h"
#include "imm.h"
#include "ime.h"
#include "strt.h"
#include "ext.h"
#include "func.h"

Set_to_item_end(CWnd *wd,int id)
{
	CWnd *wnd;
	CPoint p;
	HWND hwnd;

	wd->GetDlgItem(id,&hwnd);
	GlobalLock(hwnd);
	GetCaretPos(&p);
	LPARAM lParam;
	lParam = p.y*256*256 + p.x;
	SendMessage(hwnd,WM_LBUTTONDOWN,MK_LBUTTON,lParam);
	SendMessage(hwnd,WM_LBUTTONUP,MK_LBUTTON,lParam);
}

switch_to_chinese_mode(CWnd *wnd)
{
	BOOL ret;
	HIMC himc;
	HWND hwnd;
	CWnd *pwnd;
	DWORD num;
	HWND himewnd;
	DWORD n1,n2;
	UINT n;
    HKL lplist[20];	
	int i,j,k;
	char buf[20][40];

	hwnd = wnd->m_hWnd;
	n = GetKeyboardLayoutList(20,lplist);
    for (i=0;i<n;i++){
	  ImmGetDescription(lplist[i],buf[i],40);
    }

	k = -1;
	for (i=0;i<n;i++){
		if (strcmp(g_cur_srf,buf[i]) == 0)
			k = i;
	}
    
	char bu[40];
    if (k != -1){
	  GetKeyboardLayoutName(bu);
	  if (strcmp(bu,buf[k]) != 0)
        ActivateKeyboardLayout(lplist[k],0);
	}
}

switch_to_english_mode(CWnd *wnd)
{
	HIMC himc;
	HWND hwnd;
	UINT n;
    HKL lplist[20];	
	BOOL ret;

	hwnd = wnd->m_hWnd;
	n = GetKeyboardLayoutList(20,lplist);
	ActivateKeyboardLayout(lplist[0],0);
}

⌨️ 快捷键说明

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