Changeset 7616 for trunk/src


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

font delete bugs removed

Location:
trunk/src/comctl32
Files:
4 edited

Legend:

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

    r6709 r7616  
    128128    INT          selected;         /* index of selected item */
    129129    DWORD        flags;            /* WINE internal flags */
     130#ifdef __WIN32OS2__
     131    HFONT        hDefaultFont;
     132#endif
    130133    HFONT        font;
     134
    131135    INT          nb_items;         /* Number of items */
    132136    BOOL         bUnicode;        /* TRUE if this window is Unicode   */
     
    12211225        SystemParametersInfoA (SPI_GETICONTITLELOGFONT, sizeof(mylogfont),
    12221226                               &mylogfont, 0);
     1227#ifdef __WIN32OS2__
     1228        infoPtr->font = infoPtr->hDefaultFont = CreateFontIndirectA (&mylogfont);
     1229#else
    12231230        infoPtr->font = CreateFontIndirectA (&mylogfont);
     1231#endif
    12241232    }
    12251233    SendMessageW (infoPtr->hwndCombo, WM_SETFONT, (WPARAM)infoPtr->font, 0);
     
    17621770    }
    17631771
     1772#ifdef __WIN32OS2__
     1773    //NEVER delete the font object received by WM_SETFONT!
     1774    DeleteObject (infoPtr->hDefaultFont);
     1775#else
    17641776    DeleteObject (infoPtr->font);
     1777#endif
    17651778
    17661779    /* free comboex info data */
  • trunk/src/comctl32/rebar.c

    r6705 r7616  
    209209    HWND     hwndToolTip; /* handle to the tool tip control */
    210210    HWND     hwndNotify;  /* notification window (parent) */
     211#ifdef __WIN32OS2__
     212    HFONT    hDefaultFont;
     213#endif
    211214    HFONT    hFont;       /* handle to the rebar's font */
    212215    SIZE     imageSize;   /* image size (image list) */
     
    36333636    DeleteObject (infoPtr->hcurVert);
    36343637    DeleteObject (infoPtr->hcurDrag);
     3638
     3639#ifdef __WIN32OS2__
     3640    //NEVER delete the font object received by WM_SETFONT!
     3641    DeleteObject (infoPtr->hDefaultFont);
     3642#else
    36353643    DeleteObject (infoPtr->hFont);
     3644#endif
    36363645    SetWindowLongA (infoPtr->hwndSelf, 0, 0);
    36373646
     
    38473856    tfont = CreateFontIndirectA (&ncm.lfCaptionFont);
    38483857    if (tfont) {
     3858#ifdef __WIN32OS2__
     3859        infoPtr->hFont = infoPtr->hDefaultFont = tfont;
     3860#else
    38493861        infoPtr->hFont = tfont;
     3862#endif
    38503863    }
    38513864
  • 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 */
  • trunk/src/comctl32/tooltips.cpp

    r7408 r7616  
    2626#include "commctrl.h"
    2727#include "ccbase.h"
    28 #include "tooltips.h"
    2928#include "comctl32.h"
    3029
     
    3332#define ID_TIMERLEAVE  3    /* tool leave timer */
    3433
     34
     35typedef struct tagTT_SUBCLASS_INFO
     36{
     37    WNDPROC wpOrigProc;
     38    HWND    hwndToolTip;
     39    UINT    uRefCount;
     40} TT_SUBCLASS_INFO, *LPTT_SUBCLASS_INFO;
     41
     42
     43typedef struct tagTTTOOL_INFO
     44{
     45    UINT      uFlags;
     46    HWND      hwnd;
     47    UINT      uId;
     48    RECT      rect;
     49    HINSTANCE hinst;
     50    LPWSTR    lpszText;
     51    LPARAM    lParam;
     52} TTTOOL_INFO;
     53
     54
     55typedef struct tagTOOLTIPS_INFO
     56{
     57    COMCTL32_HEADER header;
     58
     59    WCHAR    szTipText[INFOTIPSIZE];
     60    BOOL     bActive;
     61    BOOL     bTrackActive;
     62    UINT     uNumTools;
     63    COLORREF clrBk;
     64    COLORREF clrText;
     65#ifdef __WIN32OS2__
     66    HFONT    hDefaultFont;
     67#endif
     68    HFONT    hFont;
     69    INT      xTrackPos;
     70    INT      yTrackPos;
     71    INT      nMaxTipWidth;
     72    INT      nTool;
     73    INT      nOldTool;
     74    INT      nCurrentTool;
     75    INT      nTrackTool;
     76    INT      nAutomaticTime;
     77    INT      nReshowTime;
     78    INT      nAutoPopTime;
     79    INT      nInitialTime;
     80    RECT     rcMargin;
     81
     82    TTTOOL_INFO *tools;
     83} TOOLTIPS_INFO;
    3584
    3685extern LPSTR COMCTL32_aSubclass; /* global subclassing atom */
     
    20022051    nclm.cbSize = sizeof(NONCLIENTMETRICSA);
    20032052    SystemParametersInfoA(SPI_GETNONCLIENTMETRICS,0,&nclm,0);
     2053
     2054#ifdef __WIN32OS2__
     2055    infoPtr->hFont = infoPtr-> hDefaultFont = CreateFontIndirectA(&nclm.lfStatusFont);
     2056#else
    20042057    infoPtr->hFont = CreateFontIndirectA(&nclm.lfStatusFont);
     2058#endif
    20052059
    20062060    infoPtr->nMaxTipWidth = -1;
     
    20792133
    20802134    /* delete font */
     2135#ifdef __WIN32OS2__
     2136    //NEVER delete the font object received by WM_SETFONT!
     2137    DeleteObject (infoPtr->hDefaultFont);
     2138#else
    20812139    DeleteObject (infoPtr->hFont);
     2140#endif
    20822141
    20832142    /* free tool tips info data */
     
    22862345    infoPtr->clrText = GetSysColor (COLOR_INFOTEXT);
    22872346
     2347#ifdef __WIN32OS2__
     2348    //NEVER delete the font object received by WM_SETFONT!
     2349    DeleteObject (infoPtr->hDefaultFont);
     2350#else
    22882351    DeleteObject (infoPtr->hFont);
     2352#endif
    22892353    nclm.cbSize = sizeof(NONCLIENTMETRICSA);
    22902354    SystemParametersInfoA (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0);
     2355#ifdef __WIN32OS2__
     2356    infoPtr->hFont = infoPtr->hDefaultFont = CreateFontIndirectA (&nclm.lfStatusFont);
     2357#else
    22912358    infoPtr->hFont = CreateFontIndirectA (&nclm.lfStatusFont);
    2292 
     2359#endif
    22932360    return 0;
    22942361}
Note: See TracChangeset for help on using the changeset viewer.