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

📄 xlistctrl.cpp

📁 手机数据备份软件
💻 CPP
字号:
// XListCtrl.cpp: implementation of the CXListCtrl class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "XListCtrl.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CXListCtrl::CXListCtrl()
{

}

CXListCtrl::~CXListCtrl()
{

}
LRESULT CXListCtrl::OnKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
		// TODO : Add Code for message handler. Call DefWindowProc if necessary.
	switch (wParam)
	{
		case VK_TUP:
			{
				int nSelectedID = GetSelectedIndex();
				if (!nSelectedID)
					nSelectedID = GetItemCount();				
				SelectItem(nSelectedID -1 );
				break;
			}
		case VK_TDOWN:
			{
				int nSelectedID = GetSelectedIndex() +1;
				if (nSelectedID == GetItemCount())
					nSelectedID = 0;				
				SelectItem(nSelectedID);
				break;
			}
		case VK_TACTION:
			{
				BOOL bState = GetCheckState(GetSelectedIndex());
				SetCheckState(GetSelectedIndex(),!bState);
				break;
			}
		case VK_T1:
			
		case VK_T2:
			
		case VK_T3:
			
		case VK_T4:
			
		case VK_T5:
			
		case VK_T6:
			
		case VK_T7:
			
		case VK_T8:
			{
				RedrawWindow()	;
				BOOL bState = GetCheckState(wParam - VK_T1);
				SetCheckState(wParam - VK_T1, !bState);
				break;
			}
	}
	return 0;
}

⌨️ 快捷键说明

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