- 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.
This commit is contained in:
Filip Navara 2004-12-07 14:27:43 +00:00 committed by Alexandre Julliard
parent e2b9000b84
commit 0e6c60076f
3 changed files with 9 additions and 8 deletions

View File

@ -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);
/* use DrawEdge to adjust the size of rcEdge to get 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 */
/* FIXME: account for style that allows button on left side */

View File

@ -3786,10 +3786,10 @@ REBAR_Destroy (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
infoPtr->bands = NULL;
}
DeleteObject (infoPtr->hcurArrow);
DeleteObject (infoPtr->hcurHorz);
DeleteObject (infoPtr->hcurVert);
DeleteObject (infoPtr->hcurDrag);
DestroyCursor (infoPtr->hcurArrow);
DestroyCursor (infoPtr->hcurHorz);
DestroyCursor (infoPtr->hcurVert);
DestroyCursor (infoPtr->hcurDrag);
if(infoPtr->hDefaultFont) DeleteObject (infoPtr->hDefaultFont);
SetWindowLongPtrW (infoPtr->hwndSelf, 0, 0);

View File

@ -2836,7 +2836,7 @@ VOID
TOOLTIPS_Unregister (void)
{
int i;
for (i = 0; i < TTI_ERROR+1; i++)
DeleteObject(hTooltipIcons[i]);
for (i = TTI_INFO; i <= TTI_ERROR; i++)
DestroyIcon(hTooltipIcons[i]);
UnregisterClassW (TOOLTIPS_CLASSW, NULL);
}