Ignore:
Timestamp:
Sep 18, 1999, 2:21:26 PM (26 years ago)
Author:
cbratschi
Message:

bugs fixed, hotkey: first version

File:
1 edited

Legend:

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

    r496 r968  
    1 /* $Id: header.c,v 1.8 1999-08-14 16:13:10 cbratschi Exp $ */
     1/* $Id: header.c,v 1.9 1999-09-18 12:21:25 cbratschi Exp $ */
    22/*
    33 *  Header control
     
    422422    INT  oldRop;
    423423
    424     GetClientRect (hwnd, &rect);
    425 
     424    GetClientRect (hwnd, &rect); //CB: Odin bug!!!
    426425    hOldPen = SelectObject (hdc, GetStockObject (BLACK_PEN));
    427426    oldRop = SetROP2 (hdc, R2_XORPEN);
    428427    MoveToEx (hdc, x, rect.top, NULL);
    429     LineTo (hdc, x, rect.bottom);
     428    LineTo (hdc, x, rect.bottom-1);
    430429    SetROP2 (hdc, oldRop);
    431430    SelectObject (hdc, hOldPen);
     
    13031302    HEADER_InternalHitTest (hwnd, &pt, &flags, &nItem);
    13041303
    1305     if ((dwStyle & HDS_BUTTONS) && (dwStyle & HDS_HOTTRACK)) {
     1304    if ((dwStyle & HDS_BUTTONS) && (dwStyle & HDS_HOTTRACK))
     1305    {
     1306        INT newItem;
     1307
    13061308        if (flags & (HHT_ONHEADER | HHT_ONDIVIDER | HHT_ONDIVOPEN))
    1307             infoPtr->iHotItem = nItem;
     1309            newItem = nItem;
    13081310        else
    1309             infoPtr->iHotItem = -1;
    1310         hdc = GetDC (hwnd);
    1311         HEADER_Refresh (hwnd, hdc);
    1312         ReleaseDC (hwnd, hdc);
     1311            newItem = -1;
     1312        if (newItem != infoPtr->iHotItem)
     1313        {
     1314          infoPtr->iHotItem = newItem;
     1315          hdc = GetDC (hwnd);
     1316          HEADER_Refresh (hwnd, hdc);
     1317          ReleaseDC (hwnd, hdc);
     1318        }
    13131319    }
    13141320
    13151321    if (infoPtr->bCaptured) {
    1316         if (infoPtr->bPressed) {
     1322        if (infoPtr->bPressed)
     1323        {
     1324            BOOL newDown;
     1325
    13171326            if ((nItem == infoPtr->iMoveItem) && (flags == HHT_ONHEADER))
    1318                 infoPtr->items[infoPtr->iMoveItem].bDown = TRUE;
     1327                newDown = TRUE;
    13191328            else
    1320                 infoPtr->items[infoPtr->iMoveItem].bDown = FALSE;
    1321             hdc = GetDC (hwnd);
    1322             HEADER_RefreshItem (hwnd, hdc, infoPtr->iMoveItem);
    1323             ReleaseDC (hwnd, hdc);
    1324 
     1329                newDown = FALSE;
     1330
     1331            if (newDown != infoPtr->items[infoPtr->iMoveItem].bDown)
     1332            {
     1333              infoPtr->items[infoPtr->iMoveItem].bDown = newDown;
     1334              hdc = GetDC (hwnd);
     1335              HEADER_RefreshItem (hwnd, hdc, infoPtr->iMoveItem);
     1336              ReleaseDC (hwnd, hdc);
     1337            }
    13251338//          TRACE (header, "Moving pressed item %d!\n", infoPtr->iMoveItem);
    13261339        }
Note: See TracChangeset for help on using the changeset viewer.