📄 toolkit.h
字号:
/*******************************************************************************
* Copyright (C) 1980-2008 Xumingxsh
* All rights reserved.
*
* 文件名称: ToolKit.h
* 创建日期: 2008-04-28
* 创 建 人: 徐敏荣
* 说 明: 类ToolKit的头文件。
*-------------------------------------------------------------------------------
* 版本 日 期 修改人 修改说明
*-------------------------------------------------------------------------------
* 1.0.0 2008-04-28 徐敏荣 完成初始版本
*******************************************************************************/
#if !defined(AFX_TOOLKIT_H__025A927F_BCC9_4980_8AA0_B0925AE7DAD6__INCLUDED_)
#define AFX_TOOLKIT_H__025A927F_BCC9_4980_8AA0_B0925AE7DAD6__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "XMRArray.h"
/**=============================================================================
* 名 称: <CreateWndStruct>
* 说 明: <创建界面时的结构体,存储创建参数>
* 接 口:
* 调 用:
* 编 程: <徐敏荣>,<2008-04-28>
*=============================================================================*/
struct CreateWndStruct
{
int nWndType; // 窗体类型
DWORD dwstyle; // 窗体样式
DWORD dwExStyle; // 扩展样式
LPCTSTR lpszClass; // 对应类
LPCTSTR lpszName; // 名称
DWORD style; // 样式
HWND hwndParent; // 控件的父控件句柄
HMENU hMenu; // 控件ID
HINSTANCE hInstance; // 控件所属的程序实例
LPVOID lpCreateParams;
};
/**=============================================================================
* 名 称: <ToolKit>
* 说 明: <公共操作类>
* 接 口:
* 调 用:
* 编 程: <徐敏荣>,<2008-04-28>
*=============================================================================*/
class ToolKit
{
private:
ToolKit();
virtual ~ToolKit();
public:
/**------------------------------------------------------------------------------------
* 名 称: <ToInt>
* 说 明: <将指针字符串转换为整数>
* 参 数: <char* chValue>:<指针字符串>
* 返 回: <转换后的整数>
*---------------------------------------------------------------------------------------*/
static int ToInt(char* chValue);
/**------------------------------------------------------------------------------------
* 名 称: <TrimForCharArray>
* 说 明: <去掉字符数组中的空格>
* 参 数: <char* chRes>:<字符数组>
* 返 回:
*---------------------------------------------------------------------------------------*/
static void TrimForCharArray(char* chRes);
/**------------------------------------------------------------------------------------
* 名 称: <ShowMessageBox>
* 说 明: <显示错误信息>
* 参 数: <char* chText>:<错误信息>
* 返 回:
*---------------------------------------------------------------------------------------*/
static void ShowMessageBox(char* chText);
/**------------------------------------------------------------------------------------
* 名 称: <ExitSystem>
* 说 明: <退出系统>
* 参 数:
* 返 回:
*---------------------------------------------------------------------------------------*/
static void ExitSystem();
/**------------------------------------------------------------------------------------
* 名 称: <GetCharCount>
* 说 明: <取得字符串中某字符的个数>
* 参 数: <char* chText>:<字符串>
* <char chart>:<字符>
* 返 回: <字符个数>
*---------------------------------------------------------------------------------------*/
static int GetCharCount(char* chText, char chart);
/**------------------------------------------------------------------------------------
* 名 称: <GetAppPath>
* 说 明: <取得应用程序的路径(bug路径)>
* 参 数: <CString &strAppPath>:<存储取得的路径的字符串>
* 返 回: <配置项的值>
*---------------------------------------------------------------------------------------*/
static void GetAppPath(CString &strAppPath);
/**------------------------------------------------------------------------------------
* 名 称: <GetAbsPath>
* 说 明: <根据相对路径取得绝对路径>
* 参 数: <CString strComPath>:<相对路径>
* 返 回: <配置项的值>
*---------------------------------------------------------------------------------------*/
static CString GetAbsPath(CString strComPath);
static CString ToCString(int nValue);
static void OnShowWnd(HWND hWnd);
// 取得默认文件名
static CString GetDefaultFileName();
static CString GetTrackFileName();
static CString GetTime();
};
#endif // !defined(AFX_TOOLKIT_H__025A927F_BCC9_4980_8AA0_B0925AE7DAD6__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -