dlls/comctl32: According to the PSDK, DrawShadowText() takes a non-const RECT pointer.

Francois Gouget fgouget at free.fr
Tue Jul 31 12:01:00 CDT 2007


--- 

This means we don't need to copy it into a local variable (which 
seems no better than a cast and would crash if pRect was NULL anyway).

 dlls/comctl32/commctrl.c |    8 +++-----
 include/commctrl.h       |    2 +-
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c
index c09bc04..4bfe1a5 100644
--- a/dlls/comctl32/commctrl.c
+++ b/dlls/comctl32/commctrl.c
@@ -1528,12 +1528,10 @@ LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet)
  *
  * Draw text with shadow.
  */
-int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, const RECT *pRect, DWORD dwFlags,
+int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *rect, DWORD dwFlags,
                           COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset)
 {
-    RECT rect = *pRect;
-
-    FIXME("(%p, %s, %d, %p, %d, 0x%08x, 0x%08x, %d, %d): stub\n", hdc, debugstr_w(pszText), cch, pRect, dwFlags,
+    FIXME("(%p, %s, %d, %p, %d, 0x%08x, 0x%08x, %d, %d): stub\n", hdc, debugstr_w(pszText), cch, rect, dwFlags,
                                                                   crText, crShadow, ixOffset, iyOffset);
-    return DrawTextW(hdc, pszText, cch, &rect, DT_LEFT);
+    return DrawTextW(hdc, pszText, cch, rect, DT_LEFT);
 }
diff --git a/include/commctrl.h b/include/commctrl.h
index a1e82a9..2a49e00 100644
--- a/include/commctrl.h
+++ b/include/commctrl.h
@@ -713,7 +713,7 @@ BOOL WINAPI GetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR*);
 BOOL WINAPI RemoveWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR);
 LRESULT WINAPI DefSubclassProc(HWND, UINT, WPARAM, LPARAM);
 
-int WINAPI DrawShadowText(HDC, LPCWSTR, UINT, const RECT*, DWORD, COLORREF, COLORREF, int, int);
+int WINAPI DrawShadowText(HDC, LPCWSTR, UINT, RECT*, DWORD, COLORREF, COLORREF, int, int);
 
 /* Header control */
 
-- 
1.4.4.4




More information about the wine-patches mailing list