1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
int Xpos1 = cxChar,
Xpos2 = cxChar+(22*cxCaps),
Xpos3 = cxChar+(22*cxCaps)+(40 * cxChar),
Ypos, indexint, bfrlen;
for (i = 0; i < NUMLINES; i++)
{
Ypos = cyChar*(1+i);
TextOut(hdc, Xpos1, Ypos, sysmetrics[i].szLabel, lstrlen(sysmetrics[i].szLabel));
TextOut(hdc, Xpos2, Ypos, sysmetrics[i].szDesc, lstrlen(sysmetrics[i].szDesc));
SetTextAlign(hdc, TA_RIGHT | TA_TOP);
indexint = GetSystemMetrics(sysmetrics[i].iIndex);
bfrlen = swprintf(szBuffer, lstrlen(szBuffer), L"%5d", indexint);
TextOut(hdc, Xpos3, Ypos, szBuffer, bfrlen);
SetTextAlign(hdc, TA_LEFT | TA_TOP);
}
| |