|
|
| version 1.19, 2005/03/20 13:12:49 | version 1.20, 2005/03/22 04:03:16 |
|---|---|
| Line 197 static void calctextsize(OEMCHAR *path, | Line 197 static void calctextsize(OEMCHAR *path, |
| GetTextExtentPoint32(hdc, work, OEMSTRLEN(work), &tail); | GetTextExtentPoint32(hdc, work, OEMSTRLEN(work), &tail); |
| pos = 0; | pos = 0; |
| while(pos < l) { | while(pos < l) { |
| step = ((((p[pos] ^ 0x20) - 0xa1) & 0xff) < 0x3c)?2:1; | #if defined(_UNICODE) |
| step = 1; | |
| #else | |
| step = (IsDBCSLeadByte((BYTE)p[pos]))?2:1; | |
| #endif | |
| GetTextExtentPoint32(hdc, p, pos + step, &cur); | GetTextExtentPoint32(hdc, p, pos + step, &cur); |
| if (cur.cx + tail.cx >= width) { | if (cur.cx + tail.cx >= width) { |
| break; | break; |