📄 template.h
字号:
// ***************************************************************
// Template version: 1.0
// -------------------------------------------------------------
// File Name: Template.h
// Created: 2007/07/18
// Modified: 2007/07/18 23:05
// Author: William.Liang
// Msn: lwq49@msn.com
// Email: lwq49@21cn.com, lwq49@msn.com
// Description:
//
// Purpose:
// -------------------------------------------------------------
// license:
//
// The contents of this file are subject to the Mozilla Public
// License Version 1.1 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy
// of the License at http://www.mozilla.org/MPL/ Software dis-
// tributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or im-
// plied. See the License for the specific language governing
// rights and limitations under the License.
//
// The Initial Developer of the Original Code is William.Liang .
// Copyright (C) 2007 - All Rights Reserved.
// ***************************************************************
#ifndef TEMPLATE_HEAD_FILE
#define TEMPLATE_HEAD_FILE
#pragma once
/////////////////////////////////////////////////////////////////////////////////////////
//计算数组维数
#define CountArray(Array) (sizeof(Array)/sizeof(Array[0]))
//计算字符长度
#define CountString(String) ((UINT)((lstrlen(String)+1)*sizeof(TCHAR)))
//安全删除指针
#define SafeDelete(pData) { try { if(pData) delete pData; } catch (...) { } pData=NULL; }
//安全删除指针
#define SafeDeleteArray(pData) { try { delete [] pData; } catch (...) { } pData=NULL; }
/////////////////////////////////////////////////////////////////////////////////////////
//模板头文件
#include "List.h"
#ifndef _MFCDLL
#include "String.h"
#endif
//#include "Array.h"
//#include "NamedArray.h"
//#include "Module.h"
//#include "Factory.h"
/////////////////////////////////////////////////////////////////////////////////////////
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -