Mercurial > projects > dwt-win
comparison dwt/widgets/Spinner.d @ 237:e2affbeb686d
Making tango.sys.win32.Types and dwt.internal.win32.WINTYPES to match common declaration. Make ansi charactars of type ubyte.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 19 Jun 2008 03:25:36 +0200 |
parents | 36f5cb12e1a2 |
children | fd9c62a2998e |
comparison
equal
deleted
inserted
replaced
236:9c1bb90eba13 | 237:e2affbeb686d |
---|---|
652 if (mbcsPos <= 0) return 0; | 652 if (mbcsPos <= 0) return 0; |
653 if (OS.IsUnicode) return mbcsPos; | 653 if (OS.IsUnicode) return mbcsPos; |
654 int mbcsSize = OS.GetWindowTextLengthA (hwndText); | 654 int mbcsSize = OS.GetWindowTextLengthA (hwndText); |
655 if (mbcsSize is 0) return 0; | 655 if (mbcsSize is 0) return 0; |
656 if (mbcsPos >= mbcsSize) return mbcsSize; | 656 if (mbcsPos >= mbcsSize) return mbcsSize; |
657 char [] buffer = new char [mbcsSize + 1]; | 657 CHAR [] buffer = new CHAR [mbcsSize + 1]; |
658 OS.GetWindowTextA (hwndText, buffer.ptr, mbcsSize + 1); | 658 OS.GetWindowTextA (hwndText, buffer.ptr, mbcsSize + 1); |
659 return OS.MultiByteToWideChar (getCodePage (), OS.MB_PRECOMPOSED, buffer.ptr, mbcsPos, null, 0); | 659 return OS.MultiByteToWideChar (getCodePage (), OS.MB_PRECOMPOSED, buffer.ptr, mbcsPos, null, 0); |
660 } | 660 } |
661 | 661 |
662 /** | 662 /** |