|
|

楼主 |
发表于 2007-9-4 15:08:00
|
显示全部楼层
Re:VC的Release和debug模式下一些函数是不是不一样?
words就是一个汉字字符串
lenth是用strlen words得到 i是lenth/100(整除)
我是想实现对一段话的分排显示 每排宽度100
words是函数参数
int lenth=strlen(words);
int i,j,k;
char*WORDS= new char[100];
HDC hdc;
surface->GetDC(&hdc);
HFONT newfont,oldFont;
SetBkMode(hdc, TRANSPARENT);
SetTextColor(hdc, MESSAGE_RGB);
newfont=CreateFont(20,0,0,200,1500,0,0,0,ANSI_CHARSET,0,0,0,0,MESSAGE_FONTNAME);
oldFont=(HFONT)SelectObject(hdc,newfont);
i=lenth/100;
lenth=lenth%100;
这是上面的代码 |
|