Mercurial > projects > dwt2
diff org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Text.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/Text.d Wed Mar 25 11:18:25 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Text.d Wed Mar 25 13:20:43 2009 +0100 @@ -356,7 +356,7 @@ if (string is null) return; } OS.SendMessage (handle, OS.EM_SETSEL, length, length); - TCHAR* buffer = StrToTCHARz (getCodePage (), string); + LPCTSTR buffer = StrToTCHARz (getCodePage (), string); /* * Feature in Windows. When an edit control with ES_MULTILINE * style that does not have the WS_VSCROLL style is full (i.e. @@ -369,7 +369,7 @@ * handler from WM_CHAR. */ ignoreCharacter = true; - OS.SendMessage (handle, OS.EM_REPLACESEL, 0, buffer); + OS.SendMessage (handle, OS.EM_REPLACESEL, 0, cast(void*)buffer); ignoreCharacter = false; OS.SendMessage (handle, OS.EM_SCROLLCARET, 0, 0); } @@ -696,10 +696,10 @@ * handler from WM_CHAR. */ ignoreCharacter = ignoreModify = true; - OS.SendMessage (handle, OS.EM_REPLACESEL, 0, StrToTCHARz (cp, " ")); + OS.SendMessage (handle, OS.EM_REPLACESEL, 0, cast(void*)StrToTCHARz (cp, " ")); caretPos = OS.SendMessage (handle, OS.EM_POSFROMCHAR, position, 0); OS.SendMessage (handle, OS.EM_SETSEL, position, position + 1); - OS.SendMessage (handle, OS.EM_REPLACESEL, 0, StrToTCHARz (cp, "")); + OS.SendMessage (handle, OS.EM_REPLACESEL, 0, cast(void*)StrToTCHARz (cp, "")); ignoreCharacter = ignoreModify = false; OS.SendMessage (handle, OS.EM_SETSEL, start , start ); OS.SendMessage (handle, OS.EM_SETSEL, start , end ); @@ -1227,7 +1227,7 @@ string = verifyText (string, start, end, null); if (string is null) return; } - TCHAR* buffer = StrToTCHARz (getCodePage (), string ); + LPCTSTR buffer = StrToTCHARz (getCodePage (), string ); /* * Feature in Windows. When an edit control with ES_MULTILINE * style that does not have the WS_VSCROLL style is full (i.e. @@ -1240,7 +1240,7 @@ * handler from WM_CHAR. */ ignoreCharacter = true; - OS.SendMessage (handle, OS.EM_REPLACESEL, 0, buffer); + OS.SendMessage (handle, OS.EM_REPLACESEL, 0, cast(void*)buffer); ignoreCharacter = false; } @@ -1489,7 +1489,7 @@ if (newText is null) return false; if (newText is oldText) return true; newText = Display.withCrLf (newText); - TCHAR* buffer = StrToTCHARz (getCodePage (), newText); + LPCTSTR buffer = StrToTCHARz (getCodePage (), newText); OS.SendMessage (handle, OS.EM_SETSEL, start, end); /* * Feature in Windows. When an edit control with ES_MULTILINE @@ -1503,7 +1503,7 @@ * handler from WM_CHAR. */ ignoreCharacter = true; - OS.SendMessage (handle, OS.EM_REPLACESEL, 0, buffer); + OS.SendMessage (handle, OS.EM_REPLACESEL, 0, cast(void*)buffer); ignoreCharacter = false; return false; } @@ -1673,7 +1673,7 @@ if ((style & SWT.SEARCH) !is 0) { int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); if ((bits & OS.ES_MULTILINE) is 0) { - OS.SendMessage (handle, OS.EM_SETCUEBANNER, 0, StrToTCHARz( 0, message )); + OS.SendMessage (handle, OS.EM_SETCUEBANNER, 0, cast(void*)StrToTCHARz( 0, message )); } } } @@ -1892,7 +1892,7 @@ } int limit = OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7FFFFFFF; if (string.length > limit) string = string.substring (0, limit); - TCHAR* buffer = StrToTCHARz (getCodePage (), string); + LPCTSTR buffer = StrToTCHARz (getCodePage (), string); OS.SetWindowText (handle, buffer); /* * Bug in Windows. When the widget is multi line @@ -2395,7 +2395,7 @@ callWindowProc (handle, msg, wParam, lParam); } newText = Display.withCrLf (newText); - TCHAR* buffer = StrToTCHARz(getCodePage (), newText); + LPCTSTR buffer = StrToTCHARz(getCodePage (), newText); /* * Feature in Windows. When an edit control with ES_MULTILINE * style that does not have the WS_VSCROLL style is full (i.e. @@ -2408,7 +2408,7 @@ * handler from WM_CHAR. */ ignoreCharacter = true; - OS.SendMessage (handle, OS.EM_REPLACESEL, 0, buffer); + OS.SendMessage (handle, OS.EM_REPLACESEL, 0, cast(void*)buffer); ignoreCharacter = false; return LRESULT.ZERO; }