原型是这样:
BOOL TextOut( HDC hdc, // handle of device context
int nXStart, // x-coordinate of starting position
int nYStart, // y-coordinate of starting position
LPCTSTR lpString, // address of string
int cbString // number of characters in string
);我在看windows程序设计的时候发现这个TextOut多了一个参数,为什么可以这样呢?
TextOut (hdc, x + 22 * cxCaps + 40 * cxChar, y, szBuffer,wsprintf (szBuffer, TEXT ("%5d"),GetSystemMetrics (sysmetrics[i].iIndex))) ;麻烦各位帮忙看看
BOOL TextOut( HDC hdc, // handle of device context
int nXStart, // x-coordinate of starting position
int nYStart, // y-coordinate of starting position
LPCTSTR lpString, // address of string
int cbString // number of characters in string
);我在看windows程序设计的时候发现这个TextOut多了一个参数,为什么可以这样呢?
TextOut (hdc, x + 22 * cxCaps + 40 * cxChar, y, szBuffer,wsprintf (szBuffer, TEXT ("%5d"),GetSystemMetrics (sysmetrics[i].iIndex))) ;麻烦各位帮忙看看
hdc,
x + 22 * cxCaps + 40 * cxChar,
y,
szBuffer,
wsprintf (szBuffer, TEXT ("%5d"),GetSystemMetrics (sysmetrics[i].iIndex))
) ;五个参数,,没多呀?
此句返回一个整数,也就是实际写入szBuffer的字节数。