Clinton Stimpson : comctl32:
Destroy header information on WM_NCDESTROY instead of WM_DESTROY.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Dec 4 07:17:06 CST 2006
Module: wine
Branch: master
Commit: 3f91e7529a37e50a48f21c0c3cb75c47bf3da36a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3f91e7529a37e50a48f21c0c3cb75c47bf3da36a
Author: Clinton Stimpson <cjstimpson at utwire.net>
Date: Sat Dec 2 18:12:07 2006 -0700
comctl32: Destroy header information on WM_NCDESTROY instead of WM_DESTROY.
---
dlls/comctl32/header.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c
index 5b62dda..73b1095 100644
--- a/dlls/comctl32/header.c
+++ b/dlls/comctl32/header.c
@@ -1502,10 +1502,17 @@ HEADER_Create (HWND hwnd, WPARAM wParam,
static LRESULT
HEADER_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
+ HTHEME theme = GetWindowTheme(hwnd);
+ CloseThemeData(theme);
+ return 0;
+}
+
+static LRESULT
+HEADER_NCDestroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
+{
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
HEADER_ITEM *lpItem;
INT nItem;
- HTHEME theme;
if (infoPtr->items) {
lpItem = infoPtr->items;
@@ -1519,13 +1526,11 @@ HEADER_Destroy (HWND hwnd, WPARAM wParam
Free(infoPtr->order);
if (infoPtr->himl)
- ImageList_Destroy (infoPtr->himl);
+ ImageList_Destroy (infoPtr->himl);
SetWindowLongPtrW (hwnd, 0, 0);
Free (infoPtr);
- theme = GetWindowTheme(hwnd);
- CloseThemeData(theme);
return 0;
}
@@ -2078,6 +2083,9 @@ HEADER_WindowProc (HWND hwnd, UINT msg,
case WM_DESTROY:
return HEADER_Destroy (hwnd, wParam, lParam);
+ case WM_NCDESTROY:
+ return HEADER_NCDestroy (hwnd, wParam, lParam);
+
case WM_ERASEBKGND:
return 1;
More information about the wine-cvs
mailing list