Ignore:
Timestamp:
Dec 12, 2001, 1:49:34 PM (24 years ago)
Author:
sandervl
Message:

font delete bugs removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/toolbar.c

    r6705 r7616  
    102102    INT      nOldHit;
    103103    INT      nHotItem;        /* index of the "hot" item */
     104#ifdef __WIN32OS2__
     105    HFONT    hDefaultFont;
     106#endif
    104107    HFONT    hFont;           /* text font */
    105108    HIMAGELIST himlInt;         /* image list created internally */
     
    40424045
    40434046    SystemParametersInfoA (SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
     4047#ifdef __WIN32OS2__
     4048    infoPtr->hFont = infoPtr->hDefaultFont = CreateFontIndirectA (&logFont);
     4049#else
    40444050    infoPtr->hFont = CreateFontIndirectA (&logFont);
     4051#endif
    40454052
    40464053    if (dwStyle & TBSTYLE_TOOLTIPS) {
     
    40994106
    41004107    /* delete default font */
     4108#ifdef __WIN32OS2__
     4109    //NEVER delete the font object received by WM_SETFONT!
     4110    if (infoPtr->hDefaultFont)
     4111        DeleteObject (infoPtr->hDefaultFont);
     4112#else
    41014113    if (infoPtr->hFont)
    41024114        DeleteObject (infoPtr->hFont);
     4115#endif
    41034116
    41044117    /* free toolbar info data */
Note: See TracChangeset for help on using the changeset viewer.