Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/TabItem.d @ 38:2e09b0e6857a
work on phobosfication
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 25 Mar 2009 11:18:25 +0100 |
parents | 6dd524f61e62 |
children | 0ecb2b338560 |
comparison
equal
deleted
inserted
replaced
37:46c5f8f56b41 | 38:2e09b0e6857a |
---|---|
136 string.getChars ( 0, length_, text, 0); | 136 string.getChars ( 0, length_, text, 0); |
137 int i = 0, j = 0; | 137 int i = 0, j = 0; |
138 for (i=0; i<length_; i++) { | 138 for (i=0; i<length_; i++) { |
139 if (text[i] !is '&') text [j++] = text [i]; | 139 if (text[i] !is '&') text [j++] = text [i]; |
140 } | 140 } |
141 if (j < i) string = text[ 0 .. j ].dup; | 141 if (j < i) string = text[ 0 .. j ].idup; |
142 } | 142 } |
143 } | 143 } |
144 auto hwnd = parent.handle; | 144 auto hwnd = parent.handle; |
145 auto hHeap = OS.GetProcessHeap (); | 145 auto hHeap = OS.GetProcessHeap (); |
146 TCHAR[] buffer = StrToTCHARs (parent.getCodePage (), string, true); | 146 StringT buffer = StrToTCHARs (parent.getCodePage (), string, true); |
147 int byteCount = buffer.length * TCHAR.sizeof; | 147 int byteCount = buffer.length * TCHAR.sizeof; |
148 auto pszText = cast(TCHAR*) OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount); | 148 auto pszText = cast(TCHAR*) OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount); |
149 OS.MoveMemory (pszText, buffer.ptr, byteCount); | 149 OS.MoveMemory (pszText, buffer.ptr, byteCount); |
150 TCITEM tcItem; | 150 TCITEM tcItem; |
151 tcItem.mask = OS.TCIF_TEXT; | 151 tcItem.mask = OS.TCIF_TEXT; |