Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/widgets/Text.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 |
---|---|
1064 RECT rect; | 1064 RECT rect; |
1065 auto hDC = OS.GetDC (handle); | 1065 auto hDC = OS.GetDC (handle); |
1066 HFONT newFont = cast(HFONT) OS.SendMessage (handle, OS.WM_GETFONT, 0, 0); | 1066 HFONT newFont = cast(HFONT) OS.SendMessage (handle, OS.WM_GETFONT, 0, 0); |
1067 if (newFont !is null) oldFont = OS.SelectObject (hDC, newFont); | 1067 if (newFont !is null) oldFont = OS.SelectObject (hDC, newFont); |
1068 int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX; | 1068 int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX; |
1069 TCHAR[] SPACE = StrToTCHARs (getCodePage (), " ", false); | 1069 StringT SPACE = StrToTCHARs (getCodePage (), " ", false); |
1070 OS.DrawText (hDC, SPACE.ptr, SPACE.length, &rect, flags); | 1070 OS.DrawText (hDC, SPACE.ptr, SPACE.length, &rect, flags); |
1071 if (newFont !is null) OS.SelectObject (hDC, oldFont); | 1071 if (newFont !is null) OS.SelectObject (hDC, oldFont); |
1072 OS.ReleaseDC (handle, hDC); | 1072 OS.ReleaseDC (handle, hDC); |
1073 return (rect.right - rect.left) * tabs; | 1073 return (rect.right - rect.left) * tabs; |
1074 } | 1074 } |