我想用VC6.0做一个LCD图生成程序(也是我学习VC的目的,不想学VB或其它)类似常
见的字模版生成十六进制数(HEX),用在单片机对LCD显示屏的输入,这样就不需通
过点图计算去获得单片机对LCD显示屏的输入的数据。常见的字模版生成十六进制数,
不能获得我想要的对LCD屏显示的数据,因为屏要常换,点图工作量实在太大且容易错,请大侠们相助或提供这方面学习资料的信息!!
见的字模版生成十六进制数(HEX),用在单片机对LCD显示屏的输入,这样就不需通
过点图计算去获得单片机对LCD显示屏的输入的数据。常见的字模版生成十六进制数,
不能获得我想要的对LCD屏显示的数据,因为屏要常换,点图工作量实在太大且容易错,请大侠们相助或提供这方面学习资料的信息!!
解决方案 »
- 基于dialog的工具栏和菜单怎么样使按钮和菜单项动态变灰??
- 璇烽棶锛氳亰澶╁鏈嶅姟鍣ㄦ€庢牱鐭ラ亾瀹㈡埛鏄惁鍦ㄧ嚎
- 简单com问题,100分求解,小弟深表感谢!!
- 已学完C++,想接着学VC,是不是先要学windows编程?
- 怎样把24位bmp转换成gif
- 菜鸟的VC和ACCESS问题(100分可加到400)
- 想改变单文档背景色在那个函数里设置?怎样设置?
- 关于COM的三个问题
- 怎样察看win2000下的*号密码
- WM_MOUSEMOVE是不是会触发重绘??
- 怎么打印文本域中的数据?
- 100分!!!怎么用ADO的Connection或Recordset对象向SQLServer的指定的数据库建一个表
能交流下吗?或给点思路。
做过的朋友请帮助下,分不够加
void __fastcall TForm1::Button2Click(TObject *Sender)
{
Graphics::TBitmap *pBitmap = new Graphics::TBitmap;
pBitmap->Width = 16;
pBitmap->Height = 16;
pBitmap->PixelFormat = pf8bit;
pBitmap->Canvas->Font->Name = "宋体";
pBitmap->Canvas->Font->Charset = GB2312_CHARSET;
pBitmap->Canvas->Font->Size = 12;
int k;
char buf[3];
buf[2] = 0;
AnsiString str;
AnsiString strHex; TFileStream *fs = new TFileStream("e:\\gb2312_16.h", fmCreate);
str = "const unsigned char GB2312_CHINESE[] = {\r\n";
fs->Write(str.c_str(), str.Length());
// for (int i = 0x81; i <= 0xfe; i++)
// for (int i = 0xb0; i <= 0xf7; i++)
for (int i = 0xb0; i <= 0xd7; i++)
{
buf[0] = i;
k = 0;
// for (int j = 0x40; j <= 0xfe; j++, k++)
for (int j = 0xa1; j <= 0xfe; j++, k++)
{
if (j == 0x7f)
{
continue;
}
str = "";
buf[1] = j;
pBitmap->Canvas->TextOutA(0, 0, buf);
for (int m = 0; m < pBitmap->Width; m++)
{
WORD nZm = 0;
for (int n = 0; n < pBitmap->Height; n++)
{
Byte *p = (Byte*)pBitmap->ScanLine[n];
if (p[m] == 0)
{
nZm |= 1 << n;
}
}
strHex.sprintf("0x%02X,0x%02X,", nZm & 0xff, nZm >> 8);
str += strHex;
}
str += "\r\n";
fs->Write(str.c_str(), str.Length());
Canvas->Draw((k % 16) * 16, (k / 16) * 16, pBitmap);
}
// Sleep(1000);
}
str = "};\r\n";
fs->Write(str.c_str(), str.Length());
delete fs;
delete pBitmap;
}
做过的朋友请帮助!