Mercurial > projects > dwt2
diff org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Combo.d @ 39:0ecb2b338560
further work on phobosification
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 25 Mar 2009 13:20:43 +0100 |
parents | 2e09b0e6857a |
children | 9f4c18c268b2 |
line wrap: on
line diff
--- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Combo.d Wed Mar 25 11:18:25 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Combo.d Wed Mar 25 13:20:43 2009 +0100 @@ -1028,9 +1028,9 @@ int count = OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0); if (!(0 <= start && start < count)) return -1; int index = start - 1, last = 0; - TCHAR* buffer = StrToTCHARz( string ); + LPCTSTR buffer = StrToTCHARz( string ); do { - index = OS.SendMessage (handle, OS.CB_FINDSTRINGEXACT, last = index, buffer); + index = OS.SendMessage (handle, OS.CB_FINDSTRINGEXACT, last = index, cast(void*)buffer); if (index is OS.CB_ERR || index <= last) return -1; } while (string!=/*eq*/getItem (index)); return index; @@ -1409,9 +1409,9 @@ String newText = verifyText (oldText, start, end, event); if (newText is null) return false; if (newText is oldText) return true; - TCHAR* buffer = StrToTCHARz( newText ); + LPCTSTR buffer = StrToTCHARz( newText ); OS.SendMessage (hwndText, OS.EM_SETSEL, start, end); - OS.SendMessage (hwndText, OS.EM_REPLACESEL, 0, buffer); + OS.SendMessage (hwndText, OS.EM_REPLACESEL, 0, cast(void*)buffer); return false; } @@ -1578,8 +1578,8 @@ int codePage = getCodePage (); for (int i=0; i<items.length; i++) { String string = items [i]; - TCHAR* buffer = StrToTCHARz( string ); - int code = OS.SendMessage (handle, OS.CB_ADDSTRING, 0, buffer); + LPCTSTR buffer = StrToTCHARz( string ); + int code = OS.SendMessage (handle, OS.CB_ADDSTRING, 0, cast(void*)buffer); if (code is OS.CB_ERR) error (SWT.ERROR_ITEM_NOT_ADDED); if (code is OS.CB_ERRSPACE) error (SWT.ERROR_ITEM_NOT_ADDED); if ((style & SWT.H_SCROLL) !is 0) { @@ -1820,7 +1820,7 @@ limit = OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF; } if (string.length > limit) string = string.substring (0, limit); - TCHAR* buffer = StrToTCHARz( string ); + LPCTSTR buffer = StrToTCHARz( string ); if (OS.SetWindowText (handle, buffer)) { sendEvent (SWT.Modify); // widget could be disposed at this point @@ -2398,8 +2398,8 @@ OS.HeapFree (hHeap, 0, pszText); return new LRESULT (code); } else { - TCHAR* buffer = StrToTCHARz( newText ); - OS.SendMessage (hwndText, OS.EM_REPLACESEL, 0, buffer); + LPCTSTR buffer = StrToTCHARz( newText ); + OS.SendMessage (hwndText, OS.EM_REPLACESEL, 0, cast(void*)buffer); return LRESULT.ZERO; } }