Changeset 7616 for trunk/src/comctl32/tooltips.cpp
- Timestamp:
- Dec 12, 2001, 1:49:34 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/tooltips.cpp
r7408 r7616 26 26 #include "commctrl.h" 27 27 #include "ccbase.h" 28 #include "tooltips.h"29 28 #include "comctl32.h" 30 29 … … 33 32 #define ID_TIMERLEAVE 3 /* tool leave timer */ 34 33 34 35 typedef struct tagTT_SUBCLASS_INFO 36 { 37 WNDPROC wpOrigProc; 38 HWND hwndToolTip; 39 UINT uRefCount; 40 } TT_SUBCLASS_INFO, *LPTT_SUBCLASS_INFO; 41 42 43 typedef 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 55 typedef 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; 35 84 36 85 extern LPSTR COMCTL32_aSubclass; /* global subclassing atom */ … … 2002 2051 nclm.cbSize = sizeof(NONCLIENTMETRICSA); 2003 2052 SystemParametersInfoA(SPI_GETNONCLIENTMETRICS,0,&nclm,0); 2053 2054 #ifdef __WIN32OS2__ 2055 infoPtr->hFont = infoPtr-> hDefaultFont = CreateFontIndirectA(&nclm.lfStatusFont); 2056 #else 2004 2057 infoPtr->hFont = CreateFontIndirectA(&nclm.lfStatusFont); 2058 #endif 2005 2059 2006 2060 infoPtr->nMaxTipWidth = -1; … … 2079 2133 2080 2134 /* delete font */ 2135 #ifdef __WIN32OS2__ 2136 //NEVER delete the font object received by WM_SETFONT! 2137 DeleteObject (infoPtr->hDefaultFont); 2138 #else 2081 2139 DeleteObject (infoPtr->hFont); 2140 #endif 2082 2141 2083 2142 /* free tool tips info data */ … … 2286 2345 infoPtr->clrText = GetSysColor (COLOR_INFOTEXT); 2287 2346 2347 #ifdef __WIN32OS2__ 2348 //NEVER delete the font object received by WM_SETFONT! 2349 DeleteObject (infoPtr->hDefaultFont); 2350 #else 2288 2351 DeleteObject (infoPtr->hFont); 2352 #endif 2289 2353 nclm.cbSize = sizeof(NONCLIENTMETRICSA); 2290 2354 SystemParametersInfoA (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0); 2355 #ifdef __WIN32OS2__ 2356 infoPtr->hFont = infoPtr->hDefaultFont = CreateFontIndirectA (&nclm.lfStatusFont); 2357 #else 2291 2358 infoPtr->hFont = CreateFontIndirectA (&nclm.lfStatusFont); 2292 2359 #endif 2293 2360 return 0; 2294 2361 }
Note:
See TracChangeset
for help on using the changeset viewer.