有文件C的数据结构!怎么用编程工具去生成这样的文件啊?高手指点
遵循[文件头]中的图片[高度]和[宽度]。若[文件版本]=2,则是16位色XMP图片;若[文件版本]=3,则是双色XMP图片。TMC 文件中各类结构的C语言格式如下:
#define WORD unsigned short;
#define BYTE unsigned char;
struct Tmc_Head
{
WORD Flag;
WORD AreaHeight;
WORD AreaWidth;
WORD ItemCount;
WORD FontCount;
WORD BkGroundOffset;
};
struct Item_Struct
{
BYTE AType;
BYTE Color_Red;
BYTE Color_Green;
BYTE Color_Blue;
WORD FontOffset;
BYTE BitCount;
Signed char CountDir; // 当AType=5为’时’,此字段为时区偏移
long Value;
BYTE ComPort;
BYTE HideZero;
BYTE Year;
BYTE Month;
BYTE Day;
BYTE NC0;
short YPosi;
short XPosi;
WORD NC1;
};
struct Font_Struct
{
WORD CharHeight;
WORD CharWidth;
WORD ByteCount;
BYTE Font[];
};
--------------------编程问答--------------------
Type Tmc_Head--------------------编程问答-------------------- 我是来帮顶的………………顺便看看楼上
Flag As Integer
AreaHeight As Integer
AreaWidth As Integer
ItemCount As Integer
FontCount As Integer
BkGroundOffset As Integer
End Type
Type Item_Struct
AType As Byte
Color_Red As Byte
Color_Green As Byte
Color_Blue As Byte
FontOffset As Integer
BitCount As Byte
CountDir As Byte
Value As Long
ComPort As Byte
HideZero As Byte
Year As Byte
Month As Byte
Day As Byte
NC0 As Byte
YPosi As Short
XPosi As Short
NC1 As Integer
End Type
Type Font_Struct
CharHeight As Integer
CharWidth As Integer
ByteCount As Integer
'没有与 Font[] 直接对应的类型,需要自己用 Byte() 数组进行处理'
End Type
补充:VB , 资源