Changeset 3154 for trunk/src/comctl32/rebar.cpp
- Timestamp:
- Mar 18, 2000, 5:17:35 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/rebar.cpp
r2875 r3154 1 /* $Id: rebar.cpp,v 1. 1 2000-02-23 17:09:47 cbratschi Exp $ */1 /* $Id: rebar.cpp,v 1.2 2000-03-18 16:17:27 cbratschi Exp $ */ 2 2 /* 3 3 * Rebar control … … 29 29 #include "wingdi.h" 30 30 #include "commctrl.h" 31 #include "ccbase.h" 31 32 #include "rebar.h" 32 33 #include "comctl32.h" … … 42 43 43 44 44 #define REBAR_GetInfoPtr( wndPtr) ((REBAR_INFO *)GetWindowLongA (hwnd, 0))45 #define REBAR_GetInfoPtr(hwnd) ((REBAR_INFO*)getInfoPtr(hwnd)) 45 46 46 47 … … 909 910 910 911 static LRESULT 911 REBAR_GetUnicodeFormat (HWND hwnd)912 {913 REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);914 return infoPtr->bUnicode;915 }916 917 static LRESULT918 REBAR_GetVersion (HWND hwnd)919 {920 REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);921 return infoPtr->iVersion;922 }923 924 static LRESULT925 912 REBAR_HitTest (HWND hwnd, WPARAM wParam, LPARAM lParam) 926 913 { … … 1498 1485 { 1499 1486 REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd); 1500 HWND hwndTemp = infoPtr->h wndNotify;1501 1502 infoPtr->h wndNotify = (HWND)wParam;1487 HWND hwndTemp = infoPtr->header.hwndNotify; 1488 1489 infoPtr->header.hwndNotify = (HWND)wParam; 1503 1490 1504 1491 return (LRESULT)hwndTemp; … … 1523 1510 /* << REBAR_SetTooltips >> */ 1524 1511 1525 1526 static LRESULT1527 REBAR_SetUnicodeFormat (HWND hwnd, WPARAM wParam)1528 {1529 REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);1530 BOOL bTemp = infoPtr->bUnicode;1531 infoPtr->bUnicode = (BOOL)wParam;1532 return bTemp;1533 }1534 1535 static LRESULT1536 REBAR_SetVersion (HWND hwnd, INT iVersion)1537 {1538 REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);1539 INT iOldVersion = infoPtr->iVersion;1540 1541 if (iVersion > COMCTL32_VERSION)1542 return -1;1543 1544 infoPtr->iVersion = iVersion;1545 1546 return iOldVersion;1547 }1548 1512 1549 1513 static LRESULT … … 1613 1577 1614 1578 /* allocate memory for info structure */ 1615 infoPtr = (REBAR_INFO *)COMCTL32_Alloc (sizeof(REBAR_INFO)); 1616 SetWindowLongA (hwnd, 0, (DWORD)infoPtr); 1579 infoPtr = (REBAR_INFO*)initControl(hwnd,sizeof(REBAR_INFO)); 1617 1580 1618 1581 /* initialize info structure */ 1619 infoPtr->iVersion = 0;1620 1582 infoPtr->clrBk = CLR_NONE; 1621 1583 infoPtr->clrText = RGB(0, 0, 0); … … 1627 1589 infoPtr->hcurDrag = LoadCursorA (0, IDC_SIZEA); 1628 1590 1629 infoPtr->bUnicode = IsWindowUnicode (hwnd);1630 1631 1591 // if (GetWindowLongA (hwnd, GWL_STYLE) & RBS_AUTOSIZE) 1632 1592 // FIXME (rebar, "style RBS_AUTOSIZE set!\n"); 1633 1593 1634 #if 01635 SendMessageA (hwnd, WM_NOTIFYFORMAT, (WPARAM)hwnd, NF_QUERY);1636 #endif1637 1638 // TRACE (rebar, "created!\n");1639 1594 return 0; 1640 1595 } … … 1681 1636 1682 1637 /* free rebar info data */ 1683 COMCTL32_Free (infoPtr); 1684 1685 // TRACE (rebar, "destroyed!\n"); 1638 doneControl(hwnd); 1639 1686 1640 return 0; 1687 1641 } … … 1943 1897 return REBAR_GetToolTips (hwnd); 1944 1898 1945 case RB_GETUNICODEFORMAT:1946 return REBAR_GetUnicodeFormat (hwnd);1947 1948 case CCM_GETVERSION:1949 return REBAR_GetVersion (hwnd);1950 1951 1899 case RB_HITTEST: 1952 1900 return REBAR_HitTest (hwnd, wParam, lParam); … … 1993 1941 1994 1942 /* case RB_SETTOOLTIPS: */ 1995 1996 case RB_SETUNICODEFORMAT:1997 return REBAR_SetUnicodeFormat (hwnd, wParam);1998 1999 case CCM_SETVERSION:2000 return REBAR_SetVersion (hwnd, (INT)wParam);2001 1943 2002 1944 case RB_SHOWBAND: … … 2051 1993 // ERR (rebar, "unknown msg %04x wp=%08x lp=%08lx\n", 2052 1994 // uMsg, wParam, lParam); 2053 return DefWindowProcA (hwnd, uMsg, wParam, lParam);1995 return defComCtl32ProcA (hwnd, uMsg, wParam, lParam); 2054 1996 } 2055 1997 return 0; … … 2061 2003 { 2062 2004 WNDCLASSA wndClass; 2063 2064 //SvL: Don't check this now2065 // if (GlobalFindAtomA (REBARCLASSNAMEA)) return;2066 2005 2067 2006 ZeroMemory (&wndClass, sizeof(WNDCLASSA)); … … 2081 2020 REBAR_Unregister (VOID) 2082 2021 { 2083 if (GlobalFindAtomA (REBARCLASSNAMEA)) 2084 UnregisterClassA (REBARCLASSNAMEA, (HINSTANCE)NULL); 2085 } 2086 2022 UnregisterClassA (REBARCLASSNAMEA, (HINSTANCE)NULL); 2023 } 2024
Note:
See TracChangeset
for help on using the changeset viewer.