Commit 0e6c6007 authored by Filip Navara's avatar Filip Navara Committed by Alexandre Julliard

- Don't use DrawEdge with NULL device context, it's invalid call and

sets last error. - Tooltip icons must be destroyed with DestroyIcon and not with DeleteObject. - Rebar cursors must be destroyed with DestroyCursor and not with DeleteObject.
parent e2b9000b
...@@ -814,10 +814,11 @@ DATETIME_Size (DATETIME_INFO *infoPtr, WORD flags, INT width, INT height) ...@@ -814,10 +814,11 @@ DATETIME_Size (DATETIME_INFO *infoPtr, WORD flags, INT width, INT height)
TRACE("Height=%ld, Width=%ld\n", infoPtr->rcClient.bottom, infoPtr->rcClient.right); TRACE("Height=%ld, Width=%ld\n", infoPtr->rcClient.bottom, infoPtr->rcClient.right);
/* use DrawEdge to adjust the size of rcEdge to get rcDraw */
memcpy((&infoPtr->rcDraw), (&infoPtr->rcClient), sizeof(infoPtr->rcDraw)); memcpy((&infoPtr->rcDraw), (&infoPtr->rcClient), sizeof(infoPtr->rcDraw));
DrawEdge(NULL, &(infoPtr->rcDraw), EDGE_SUNKEN, BF_RECT | BF_ADJUST); /* subract the size of the edge drawn by DrawEdge */
InflateRect(&infoPtr->rcDraw, -GetSystemMetrics(SM_CXEDGE),
-GetSystemMetrics(SM_CYEDGE));
/* set the size of the button that drops the calendar down */ /* set the size of the button that drops the calendar down */
/* FIXME: account for style that allows button on left side */ /* FIXME: account for style that allows button on left side */
......
...@@ -3786,10 +3786,10 @@ REBAR_Destroy (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam) ...@@ -3786,10 +3786,10 @@ REBAR_Destroy (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
infoPtr->bands = NULL; infoPtr->bands = NULL;
} }
DeleteObject (infoPtr->hcurArrow); DestroyCursor (infoPtr->hcurArrow);
DeleteObject (infoPtr->hcurHorz); DestroyCursor (infoPtr->hcurHorz);
DeleteObject (infoPtr->hcurVert); DestroyCursor (infoPtr->hcurVert);
DeleteObject (infoPtr->hcurDrag); DestroyCursor (infoPtr->hcurDrag);
if(infoPtr->hDefaultFont) DeleteObject (infoPtr->hDefaultFont); if(infoPtr->hDefaultFont) DeleteObject (infoPtr->hDefaultFont);
SetWindowLongPtrW (infoPtr->hwndSelf, 0, 0); SetWindowLongPtrW (infoPtr->hwndSelf, 0, 0);
......
...@@ -2836,7 +2836,7 @@ VOID ...@@ -2836,7 +2836,7 @@ VOID
TOOLTIPS_Unregister (void) TOOLTIPS_Unregister (void)
{ {
int i; int i;
for (i = 0; i < TTI_ERROR+1; i++) for (i = TTI_INFO; i <= TTI_ERROR; i++)
DeleteObject(hTooltipIcons[i]); DestroyIcon(hTooltipIcons[i]);
UnregisterClassW (TOOLTIPS_CLASSW, NULL); UnregisterClassW (TOOLTIPS_CLASSW, 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