?? font.cpp
字號:
#include "stdafx.h"
#include "font.h"
extern int g_iArrPara[50]; //函數(shù)參數(shù)組 g_iArrPara[0] 存放參數(shù)個數(shù),g_iArrPara[1],g_iArrPara[2]...為相應(yīng)參數(shù)
struct CharRowProp struCharProp;
//?
//行屬性
//ESC #3 設(shè)置當(dāng)前行為倍寬倍高(上半部分)
int SetRowPropDbWHTop()
{
struCharProp.cRowWHPorp=1;
return 0;
}
//ESC #4 設(shè)置當(dāng)前行為倍寬倍高(下半部分)
int SetRowPropDbWHBottom()
{
struCharProp.cRowWHPorp=2;;
return 0;
}
//ESC #5 設(shè)置當(dāng)前行為單寬單高
int SetRowPropSingleWH()
{
struCharProp.cRowWHPorp=0;
return 0;
}
//ESC #6 設(shè)置當(dāng)前行為倍寬單高
int SetRowPropDoubleSingleWH()
{
struCharProp.cRowWHPorp=3;
return 0;
}
//字符屬性
//CSI Ps;Ps;...m 設(shè)置字符顯示屬性,Ps代表某種字符屬性,見表3.1.3.3-2
int SetCharProp()
{
int i;
if (g_iArrPara[0]==0)
{
struCharProp.iLight=0;
struCharProp.iUnderLine=0;
struCharProp.iFlash=0;
struCharProp.iDisplay=0;
struCharProp.iPassword=0;
struCharProp.cCharWHProp=0;
return 0;
}
for (i=1;i<=g_iArrPara[0];i++)
{
switch (g_iArrPara[i])
{
case 0:
struCharProp.iLight=0;
struCharProp.iUnderLine=0;
struCharProp.iFlash=0;
struCharProp.iDisplay=0;
struCharProp.iPassword=0;
struCharProp.cCharWHProp=0;
break;
case 1:
struCharProp.iLight=1;break;
case 3:
struCharProp.iPassword=1;break;
case 4:
struCharProp.iUnderLine=1;break;
case 5:
struCharProp.iFlash=1;break;
case 6:
struCharProp.iPassword=1;break;
case 7:
struCharProp.iDisplay=1;break;
case 8:
struCharProp.iPassword=1;break;
case 9:
struCharProp.cCharWHProp=1;break;
case 10:
struCharProp.cCharWHProp=2;break;
case 13:
struCharProp.cCharWHProp=3;break;
case 14:
struCharProp.cCharWHProp=4;break;
case 16:
struCharProp.cCharWHProp=5;break;
case 22:
struCharProp.iLight=0;break;
case 23:
struCharProp.cCharWHProp=0;
break;
case 24:
struCharProp.iUnderLine=0;break;
case 25:
struCharProp.iFlash=0;break;
case 27:
struCharProp.iDisplay=0;break;
case 28:
struCharProp.iPassword=0;break;
default:break;
}
}
return 0;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -