Commit 52e0e9c1 authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Complete implementation for DrawStatusText{A,W}.

parent aba59471
...@@ -412,26 +412,34 @@ GetEffectiveClientRect (HWND hwnd, LPRECT lpRect, LPINT lpInfo) ...@@ -412,26 +412,34 @@ GetEffectiveClientRect (HWND hwnd, LPRECT lpRect, LPINT lpInfo)
* (will be written ...) * (will be written ...)
*/ */
VOID WINAPI void WINAPI DrawStatusTextW (HDC hdc, LPRECT lprc, LPCWSTR text, UINT style)
DrawStatusTextW (HDC hdc, LPRECT lprc, LPCWSTR text, UINT style)
{ {
RECT r = *lprc; RECT r = *lprc;
UINT border = BDR_SUNKENOUTER; UINT border = BDR_SUNKENOUTER;
if (style & SBT_POPOUT) if (style & SBT_POPOUT)
border = BDR_RAISEDOUTER; border = BDR_RAISEDOUTER;
else if (style & SBT_NOBORDERS) else if (style & SBT_NOBORDERS)
border = 0; border = 0;
DrawEdge (hdc, &r, border, BF_RECT|BF_ADJUST|BF_MIDDLE); DrawEdge (hdc, &r, border, BF_RECT|BF_ADJUST);
/* now draw text */ /* now draw text */
if (text) { if (text) {
int oldbkmode = SetBkMode (hdc, TRANSPARENT); int oldbkmode = SetBkMode (hdc, TRANSPARENT);
r.left += 3; UINT align = DT_LEFT;
DrawTextW (hdc, text, lstrlenW(text), if (*text == L'\t') {
&r, DT_LEFT|DT_VCENTER|DT_SINGLELINE); text++;
if (oldbkmode != TRANSPARENT) align = DT_CENTER;
if (*text == L'\t') {
text++;
align = DT_RIGHT;
}
}
r.left += 3;
if (style & SBT_RTLREADING)
FIXME("Usupported RTL style!");
DrawTextW (hdc, text, -1, &r, align|DT_VCENTER|DT_SINGLELINE);
SetBkMode(hdc, oldbkmode); SetBkMode(hdc, oldbkmode);
} }
} }
...@@ -453,8 +461,7 @@ DrawStatusTextW (HDC hdc, LPRECT lprc, LPCWSTR text, UINT style) ...@@ -453,8 +461,7 @@ DrawStatusTextW (HDC hdc, LPRECT lprc, LPCWSTR text, UINT style)
* No return value. * No return value.
*/ */
VOID WINAPI void WINAPI DrawStatusTextA (HDC hdc, LPRECT lprc, LPCSTR text, UINT style)
DrawStatusTextA (HDC hdc, LPRECT lprc, LPCSTR text, UINT style)
{ {
INT len; INT len;
LPWSTR textW = NULL; LPWSTR textW = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment