comctl32: Destroy header information on WM_NCDESTROY instead of WM_DESTROY.
This commit is contained in:
parent
b4f0adbf96
commit
3f91e7529a
|
@ -1501,11 +1501,18 @@ HEADER_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
HEADER_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
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_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
|
||||||
HEADER_ITEM *lpItem;
|
HEADER_ITEM *lpItem;
|
||||||
INT nItem;
|
INT nItem;
|
||||||
HTHEME theme;
|
|
||||||
|
|
||||||
if (infoPtr->items) {
|
if (infoPtr->items) {
|
||||||
lpItem = infoPtr->items;
|
lpItem = infoPtr->items;
|
||||||
|
@ -1524,8 +1531,6 @@ HEADER_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
SetWindowLongPtrW (hwnd, 0, 0);
|
SetWindowLongPtrW (hwnd, 0, 0);
|
||||||
Free (infoPtr);
|
Free (infoPtr);
|
||||||
|
|
||||||
theme = GetWindowTheme(hwnd);
|
|
||||||
CloseThemeData(theme);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2078,6 +2083,9 @@ HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
return HEADER_Destroy (hwnd, wParam, lParam);
|
return HEADER_Destroy (hwnd, wParam, lParam);
|
||||||
|
|
||||||
|
case WM_NCDESTROY:
|
||||||
|
return HEADER_NCDestroy (hwnd, wParam, lParam);
|
||||||
|
|
||||||
case WM_ERASEBKGND:
|
case WM_ERASEBKGND:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue