Ignore:
Timestamp:
Sep 15, 2001, 11:13:31 AM (24 years ago)
Author:
sandervl
Message:

update

File:
1 edited

Legend:

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

    r6644 r6705  
    1 /* $Id: pager.c,v 1.9 2001-09-05 12:05:01 bird Exp $ */
    21/*
    32 * Pager control
     
    2120#include "debugtools.h"
    2221
     22DEFAULT_DEBUG_CHANNEL(pager);
     23
    2324#ifdef __WIN32OS2__
    2425#include "ccbase.h"
     26#undef inline
    2527#define inline
    2628#endif
    27 
    28 DEFAULT_DEBUG_CHANNEL(pager);
    2929
    3030typedef struct
     
    4040    INT    nPos;       /* scroll position */
    4141    INT    nWidth;     /* from child wnd's response to PGN_CALCSIZE */
    42     INT    nHeight;    /* from child wnd's response to PGN_CALCSIZE */
     42    INT    nHeight;    /* from child wnd's response to PGN_CALCSIZE */ 
    4343    BOOL   bForward;   /* forward WM_MOUSEMOVE msgs to the contained wnd */
    4444    INT    TLbtnState; /* state of top or left btn */
     
    5858#define REPEAT_DELAY     50
    5959
    60 /* the horizontal arrows are:
     60/* the horizontal arrows are: 
    6161 *
    6262 * 01234    01234
     
    6767 * 5 **      **
    6868 * 6  *      *
    69  * 7
     69 * 7 
    7070 *
    7171 */
     
    7575    INT x, y, w, h;
    7676    HPEN hOldPen;
    77 
     77   
    7878    w = r.right - r.left + 1;
    7979    h = r.bottom - r.top + 1;
     
    108108}
    109109
    110 /* the vertical arrows are:
     110/* the vertical arrows are: 
    111111 *
    112112 * 01234567    01234567
    113  * 1******        **
     113 * 1******        ** 
    114114 * 2 ****        ****
    115115 * 3  **        ******
     
    122122    INT x, y, w, h;
    123123    HPEN hOldPen;
    124 
     124   
    125125    w = r.right - r.left + 1;
    126126    h = r.bottom - r.top + 1;
     
    166166
    167167    if ((rc.right - rc.left <= 0) || (rc.bottom - rc.top <= 0))
    168         return;
     168        return; 
    169169
    170170    hBrush = CreateSolidBrush(clrBk);
     
    173173    FillRect(hdc, &rc, hBrush);
    174174
    175     if (btnState == PGF_HOT)
     175    if (btnState == PGF_HOT) 
    176176    {
    177177       DrawEdge( hdc, &rc, BDR_RAISEDINNER, BF_RECT);
     
    181181           PAGER_DrawVertArrow(hdc, rc, COLOR_WINDOWFRAME, topLeft);
    182182    }
    183     else if (btnState == PGF_NORMAL)
     183    else if (btnState == PGF_NORMAL) 
    184184    {
    185185       DrawEdge (hdc, &rc, BDR_OUTER, BF_FLAT);
     
    189189           PAGER_DrawVertArrow(hdc, rc, COLOR_WINDOWFRAME, topLeft);
    190190    }
    191     else if (btnState == PGF_DEPRESSED)
     191    else if (btnState == PGF_DEPRESSED) 
    192192    {
    193193       DrawEdge( hdc, &rc, BDR_SUNKENOUTER, BF_RECT);
     
    197197           PAGER_DrawVertArrow(hdc, rc, COLOR_WINDOWFRAME, topLeft);
    198198    }
    199     else if (btnState == PGF_GRAYED)
     199    else if (btnState == PGF_GRAYED) 
    200200    {
    201201       DrawEdge (hdc, &rc, BDR_OUTER, BF_FLAT);
     
    234234PAGER_GetButtonState (HWND hwnd, WPARAM wParam, LPARAM lParam)
    235235{
    236     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
     236    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 
    237237    LRESULT btnState = PGF_INVISIBLE;
    238238    INT btn = (INT)lParam;
     
    251251PAGER_GetPos(HWND hwnd)
    252252{
    253     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
     253    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 
    254254    TRACE("[%04x] returns %d\n", hwnd, infoPtr->nPos);
    255255    return (LRESULT)infoPtr->nPos;
     
    259259PAGER_GetButtonSize(HWND hwnd)
    260260{
    261     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
     261    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 
    262262    TRACE("[%04x] returns %d\n", hwnd, infoPtr->nButtonSize);
    263263    return (LRESULT)infoPtr->nButtonSize;
     
    267267PAGER_GetBorder(HWND hwnd)
    268268{
    269     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
     269    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 
    270270    TRACE("[%04x] returns %d\n", hwnd, infoPtr->nBorder);
    271271    return (LRESULT)infoPtr->nBorder;
     
    275275PAGER_GetBkColor(HWND hwnd)
    276276{
    277     PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
     277    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 
    278278    TRACE("[%04x] returns %06lx\n", hwnd, infoPtr->clrBk);
    279279    return (LRESULT)infoPtr->clrBk;
    280280}
    281281
    282 static void
    283 PAGER_CalcSize (HWND hwnd, INT* size, BOOL getWidth)
     282static void 
     283PAGER_CalcSize (HWND hwnd, INT* size, BOOL getWidth) 
    284284{
    285285    NMPGCALCSIZE nmpgcs;
     
    291291    nmpgcs.iWidth = getWidth ? *size : 0;
    292292    nmpgcs.iHeight = getWidth ? 0 : *size;
    293     SendMessageA (hwnd, WM_NOTIFY,
     293    SendMessageA (GetParent (hwnd), WM_NOTIFY,
    294294                  (WPARAM)nmpgcs.hdr.idFrom, (LPARAM)&nmpgcs);
    295295
     
    334334                infoPtr->nHeight = wndSize;
    335335
    336             TRACE("[%04x] SWP %dx%d at (%d,%d)\n", hwnd,
     336            TRACE("[%04x] SWP %dx%d at (%d,%d)\n", hwnd, 
    337337                         infoPtr->nWidth, infoPtr->nHeight,
    338338                         0, -nPos);
     
    380380}
    381381
    382 static void
     382static void 
    383383PAGER_GrayAndRestoreBtns(PAGER_INFO* infoPtr, INT scrollRange,
    384384                         BOOL* needsResize, BOOL* needsRepaint)
     
    417417
    418418
    419 static void
     419static void 
    420420PAGER_NormalizeBtns(PAGER_INFO* infoPtr, BOOL* needsRepaint)
    421421{
     
    433433}
    434434
    435 static void
     435static void 
    436436PAGER_HideGrayBtns(PAGER_INFO* infoPtr, BOOL* needsResize)
    437437{
     
    464464        PAGER_HideGrayBtns(infoPtr, &resizeClient);
    465465
    466     if (resizeClient) /* initiate NCCalcSize to resize client wnd */
    467         SetWindowPos(hwnd, 0,0,0,0,0,
     466    if (resizeClient) /* initiate NCCalcSize to resize client wnd */ {
     467        SetWindowPos(hwnd, 0,0,0,0,0, 
    468468                     SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE |
    469469                     SWP_NOZORDER | SWP_NOACTIVATE);
     470    }
    470471
    471472    if (repaintBtns)
    472         SendMessageA(hwnd, WM_NCPAINT, 0, 0);
    473 }
    474 
    475 static LRESULT
     473        SendMessageA(hwnd, WM_NCPAINT, 0, 0); 
     474}
     475
     476static LRESULT 
    476477PAGER_SetPos(HWND hwnd, INT newPos, BOOL fromBtnPress)
    477478{
     
    500501
    501502static LRESULT
    502 PAGER_HandleWindowPosChanging(HWND hwnd, WINDOWPOS *winpos)
     503PAGER_HandleWindowPosChanging(HWND hwnd, WPARAM wParam, WINDOWPOS *winpos)
    503504{
    504505    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
     
    510511         * (i.e. height for a horizontal pager, or width for a vertical one) */
    511512
     513        /* except if the current dimension is 0 and app is setting for
     514         * first time, then save amount as dimension. - GA 8/01 */
     515
    512516        if (PAGER_IsHorizontal(hwnd))
    513             winpos->cy = infoPtr->nHeight;
     517            if (!infoPtr->nHeight && winpos->cy)
     518                infoPtr->nHeight = winpos->cy;
     519            else
     520                winpos->cy = infoPtr->nHeight;
    514521        else
    515             winpos->cx = infoPtr->nWidth;
    516     }
    517 
    518     return 0;
    519 }
    520 
    521 static void
     522            if (!infoPtr->nWidth && winpos->cx)
     523                infoPtr->nWidth = winpos->cx;
     524            else
     525                winpos->cx = infoPtr->nWidth;
     526        return 0;
     527    }
     528
     529    DefWindowProcA (hwnd, WM_WINDOWPOSCHANGING, wParam, (LPARAM)winpos);
     530
     531    return 1;
     532}
     533
     534static INT
    522535PAGER_SetFixedWidth(HWND hwnd, PAGER_INFO* infoPtr)
    523536{
     
    544557    h = wndRect.bottom - wndRect.top + infoPtr->nButtonSize;
    545558
    546     /* adjust non-scrollable dimension to fit the child */
    547     SetWindowPos(hwnd, 0, 0,0, infoPtr->nWidth, h,
    548                  SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER);
    549 
    550 
    551559    TRACE("[%04x] infoPtr->nWidth set to %d\n",
    552            hwnd, infoPtr->nWidth);
    553 }
    554 
    555 static void
     560               hwnd, infoPtr->nWidth);
     561
     562    return h;
     563}
     564
     565static INT
    556566PAGER_SetFixedHeight(HWND hwnd, PAGER_INFO* infoPtr)
    557567{
     
    578588    w = wndRect.right - wndRect.left + infoPtr->nButtonSize;
    579589
    580     /* adjust non-scrollable dimension to fit the child */
    581     SetWindowPos(hwnd, 0, 0,0, w, infoPtr->nHeight,
    582                  SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER);
    583 
    584590    TRACE("[%04x] infoPtr->nHeight set to %d\n",
    585            hwnd, infoPtr->nHeight);
     591               hwnd, infoPtr->nHeight);
     592
     593    return w;
    586594}
    587595
     
    602610            PAGER_SetPos(hwnd, 0, FALSE);
    603611        }
    604         else
     612        else 
    605613        {
    606614            PAGER_UpdateBtns(hwnd, infoPtr, scrollRange, TRUE);
     
    663671{
    664672    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
     673    INT hw;
    665674
    666675    infoPtr->hwndChild = IsWindow ((HWND)lParam) ? (HWND)lParam : 0;
     
    670679        TRACE("[%04x] hwndChild=%04x\n", hwnd, infoPtr->hwndChild);
    671680
    672         if (PAGER_IsHorizontal(hwnd))
    673             PAGER_SetFixedHeight(hwnd, infoPtr);
    674         else
    675             PAGER_SetFixedWidth(hwnd, infoPtr);
     681        if (PAGER_IsHorizontal(hwnd)) {
     682            hw = PAGER_SetFixedHeight(hwnd, infoPtr);
     683            /* adjust non-scrollable dimension to fit the child */
     684            SetWindowPos(hwnd, 0, 0,0, hw, infoPtr->nHeight,
     685                         SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER |
     686                         SWP_NOSIZE | SWP_NOACTIVATE);
     687        }
     688        else {
     689            hw = PAGER_SetFixedWidth(hwnd, infoPtr);
     690            /* adjust non-scrollable dimension to fit the child */
     691            SetWindowPos(hwnd, 0, 0,0, infoPtr->nWidth, hw,
     692                         SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER |
     693                         SWP_NOSIZE | SWP_NOACTIVATE);
     694        }
    676695
    677696        /* position child within the page scroller */
    678697        SetWindowPos(infoPtr->hwndChild, HWND_TOP,
    679698                     0,0,0,0,
    680                      SWP_SHOWWINDOW | SWP_NOSIZE);
     699                     SWP_SHOWWINDOW | SWP_NOSIZE);  /* native is 0 */
    681700
    682701        infoPtr->nPos = -1;
     
    701720        nmpgScroll.hdr.code = PGN_SCROLL;
    702721
    703         GetWindowRect(hwnd, &rcWnd);
    704         GetClientRect(hwnd, &nmpgScroll.rcParent);
     722        GetWindowRect(hwnd, &rcWnd); 
     723        GetClientRect(hwnd, &nmpgScroll.rcParent); 
    705724        nmpgScroll.iXpos = nmpgScroll.iYpos = 0;
    706725        nmpgScroll.iDir = dir;
     
    717736        }
    718737        nmpgScroll.iScroll -= 2*infoPtr->nButtonSize;
    719 
     738 
    720739        SendMessageA (hwnd, WM_NOTIFY,
    721740                    (WPARAM)nmpgScroll.hdr.idFrom, (LPARAM)&nmpgScroll);
    722 
     741 
    723742        TRACE("[%04x] PGN_SCROLL returns iScroll=%d\n", hwnd, nmpgScroll.iScroll);
    724743
     
    770789        FIXME("[%04x] Drag and Drop style is not implemented yet.\n", hwnd);
    771790    /*
    772     * If neither horizontal nor vertical style specified, default to vertical.
    773     * This is probably not necessary, since the style may be set later on as
    774     * the control is initialized, but just in case it isn't, set it here.
    775     */
     791        * If neither horizontal nor vertical style specified, default to vertical.
     792        * This is probably not necessary, since the style may be set later on as
     793        * the control is initialized, but just in case it isn't, set it here.
     794        */
    776795    if (!(dwStyle & PGS_HORZ) && !(dwStyle & PGS_VERT))
    777796    {
     
    799818    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
    800819    LPRECT lpRect = (LPRECT)lParam;
     820    RECT rcChildw, rcmyw, wnrc, lbrc, rbrc;
     821    POINT cursor;
     822
    801823    /*
    802824     * lParam points to a RECT struct.  On entry, the struct
    803      * contains the proposed wnd rectangle for the window.
     825     * contains the proposed wnd rectangle for the window. 
    804826     * On exit, the struct should contain the screen
    805827     * coordinates of the corresponding window's client area.
    806828     */
     829       
     830    DefWindowProcA (hwnd, WM_NCCALCSIZE, wParam, lParam);
    807831
    808832    if (PAGER_IsHorizontal(hwnd))
    809833    {
    810         if (infoPtr->TLbtnState) /* != PGF_INVISIBLE */
    811             lpRect->left += infoPtr->nButtonSize;
    812         if (infoPtr->BRbtnState)
    813             lpRect->right -= infoPtr->nButtonSize;
     834        infoPtr->nWidth = lpRect->right - lpRect->left;
     835        PAGER_CalcSize (hwnd, &infoPtr->nWidth, TRUE);
     836        GetWindowRect (infoPtr->hwndChild, &rcChildw);
     837        MapWindowPoints (0, hwnd, (LPPOINT)&rcChildw, 2);
     838        GetCursorPos (&cursor);
     839        GetWindowRect (hwnd, &rcmyw);
     840        if (PtInRect (&rcmyw, cursor)) {
     841            GetWindowRect (hwnd, &wnrc);
     842            lbrc = wnrc;
     843            lbrc.right = lbrc.left + infoPtr->nButtonSize;
     844            rbrc = wnrc;
     845            rbrc.left = rbrc.right - infoPtr->nButtonSize;
     846            TRACE("horz lb rect=(%d,%d)-(%d,%d), rb rect=(%d,%d)-(%d,%d)\n",
     847                  lbrc.left, lbrc.top, lbrc.right, lbrc.bottom,
     848                  rbrc.left, rbrc.top, rbrc.right, rbrc.bottom);
     849            if (PtInRect (&lbrc, cursor) && infoPtr->TLbtnState)
     850                RedrawWindow (hwnd, 0, 0, RDW_INVALIDATE | RDW_ERASE);
     851            if (PtInRect (&rbrc, cursor) && infoPtr->BRbtnState)
     852                RedrawWindow (hwnd, 0, 0, RDW_INVALIDATE | RDW_ERASE);
     853        }
     854        if (infoPtr->TLbtnState) /* != PGF_INVISIBLE */
     855            lpRect->left += infoPtr->nButtonSize;
     856        if (infoPtr->BRbtnState)
     857            lpRect->right -= infoPtr->nButtonSize;
    814858    }
    815859    else
    816860    {
    817         if (infoPtr->TLbtnState)
    818             lpRect->top += infoPtr->nButtonSize;
    819         if (infoPtr->BRbtnState)
    820             lpRect->bottom -= infoPtr->nButtonSize;
     861        /* native does: (from trace of IE4 opening "Favorites" frame)
     862         *        DefWindowProc
     863         *        WM_NOITFY  PGN_CALCSIZE w/ dwFlag=2
     864         *        GetWindowRect (child, &rc)
     865         *        MapWindowPoints (0, syspager, &rc, 2)
     866         *        GetCursorPos( &cur )
     867         *        GetWindowRect (syspager, &rc2)
     868         *        PtInRect (&rc2, cur.x, cur.y) rtns 0
     869         *        returns with rect empty
     870         */
     871        infoPtr->nHeight = lpRect->bottom - lpRect->top;
     872        PAGER_CalcSize (hwnd, &infoPtr->nHeight, FALSE);
     873        GetWindowRect (infoPtr->hwndChild, &rcChildw);
     874        MapWindowPoints (0, hwnd, (LPPOINT)&rcChildw, 2);
     875        GetCursorPos (&cursor);
     876        GetWindowRect (hwnd, &rcmyw);
     877        if (PtInRect (&rcmyw, cursor)) {
     878
     879            /* native does:
     880             *    GetWindowRect(pager, &rc)
     881             *    PtInRect(btn-left????, cur.x, cur.y)
     882             *    if true -> ???
     883             *    PtInRect(btn-right????, cur.x, cur.y)
     884             *    if true
     885             *      RedrawWindow(pager, 0, 0, 5)
     886             *      return TRUE
     887             */
     888
     889            GetWindowRect (hwnd, &wnrc);
     890            lbrc = wnrc;
     891            lbrc.right = lbrc.left + infoPtr->nButtonSize;
     892            rbrc = wnrc;
     893            rbrc.left = rbrc.right - infoPtr->nButtonSize;
     894            TRACE("vert lb rect=(%d,%d)-(%d,%d), rb rect=(%d,%d)-(%d,%d)\n",
     895                  lbrc.left, lbrc.top, lbrc.right, lbrc.bottom,
     896                  rbrc.left, rbrc.top, rbrc.right, rbrc.bottom);
     897            if (PtInRect (&lbrc, cursor) && infoPtr->TLbtnState)
     898                RedrawWindow (hwnd, 0, 0, RDW_INVALIDATE | RDW_ERASE);
     899            if (PtInRect (&rbrc, cursor) && infoPtr->BRbtnState)
     900                RedrawWindow (hwnd, 0, 0, RDW_INVALIDATE | RDW_ERASE);
     901        }
     902        if (infoPtr->TLbtnState)
     903            lpRect->top += infoPtr->nButtonSize;
     904        if (infoPtr->BRbtnState)
     905            lpRect->bottom -= infoPtr->nButtonSize;
     906        /* ???? */
     907        if ((lpRect->bottom < 0) || (lpRect->bottom > infoPtr->nHeight))
     908            lpRect->bottom = infoPtr->nHeight;
    821909    }
    822910
     
    864952                     bHorizontal, TRUE, infoPtr->TLbtnState);
    865953    PAGER_DrawButton(hdc, infoPtr->clrBk, rcBottomRight,
    866                      bHorizontal, FALSE, infoPtr->BRbtnState);
     954                     bHorizontal, FALSE, infoPtr->BRbtnState); 
    867955
    868956    ReleaseDC( hwnd, hdc );
     
    870958}
    871959
    872 static INT
     960static INT 
    873961PAGER_HitTest (HWND hwnd, LPPOINT pt)
    874962{
     
    9771065        if(!(trackinfo.dwFlags & TME_LEAVE)) {
    9781066            trackinfo.dwFlags = TME_LEAVE; /* notify upon leaving */
    979 
     1067 
    9801068           /* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */
    9811069           /* and can properly deactivate the hot button */
     
    9831071        }
    9841072
    985         SendMessageA(hwnd, WM_NCPAINT, 0, 0);
     1073        SendMessageA(hwnd, WM_NCPAINT, 0, 0); 
    9861074    }
    9871075
     
    10261114
    10271115    TRACE("[%04x]\n", hwnd);
    1028 
     1116       
    10291117    hit = PAGER_HitTest(hwnd, &pt);
    10301118
     
    10341122        repaintBtns = infoPtr->TLbtnState != PGF_DEPRESSED;
    10351123        infoPtr->TLbtnState = PGF_DEPRESSED;
    1036         SetTimer(hwnd, TIMERID1, INITIAL_DELAY, 0);
     1124        SetTimer(hwnd, TIMERID1, INITIAL_DELAY, 0); 
    10371125    }
    10381126    else if (hit == HTRIGHT || hit == HTBOTTOM)
     
    10401128        repaintBtns = infoPtr->BRbtnState != PGF_DEPRESSED;
    10411129        infoPtr->BRbtnState = PGF_DEPRESSED;
    1042         SetTimer(hwnd, TIMERID1, INITIAL_DELAY, 0);
     1130        SetTimer(hwnd, TIMERID1, INITIAL_DELAY, 0); 
    10431131    }
    10441132
    10451133    if (repaintBtns)
    1046         SendMessageA(hwnd, WM_NCPAINT, 0, 0);
     1134        SendMessageA(hwnd, WM_NCPAINT, 0, 0); 
    10471135
    10481136    switch(hit)
     
    10891177PAGER_EraseBackground (HWND hwnd, WPARAM wParam, LPARAM lParam)
    10901178{
     1179    POINT pt, ptorig;
     1180    HDC hdc = (HDC)wParam;
     1181    HWND parent;
     1182
     1183    /* native does:
     1184     *   parent = GetParent(pager)
     1185     *   pt.x=0; pt.y=0; ?????
     1186     *   MapWindowPoints(pager, parent, &pt, 1)
     1187     *   OffsetWindowOrgEx(hdc, pt.x, pt.y, &ptorg)
     1188     *   SendMessageA(parent, WM_ERASEBKGND, hdc, 0)
     1189     *   SetWindowOrgEx(hdc, 0, 0, 0)
     1190     */
     1191
     1192    pt.x = 0;
     1193    pt.y = 0;
     1194    parent = GetParent(hwnd);
     1195    MapWindowPoints(hwnd, parent, &pt, 1);
     1196    OffsetWindowOrgEx (hdc, pt.x, pt.y, &ptorig);
     1197    SendMessageA (parent, WM_ERASEBKGND, wParam, lParam);
     1198    SetWindowOrgEx (hdc, ptorig.x, ptorig.y, 0);
     1199
     1200
     1201#if 0
    10911202    PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd);
    10921203    HBRUSH hBrush = CreateSolidBrush(infoPtr->clrBk);
     
    11041215
    11051216    DeleteObject (hBrush);
     1217#endif
     1218
    11061219    return TRUE;
    11071220}
     
    11311244
    11321245    if (!infoPtr && (uMsg != WM_CREATE))
    1133     return DefWindowProcA (hwnd, uMsg, wParam, lParam);
     1246        return DefWindowProcA (hwnd, uMsg, wParam, lParam);
    11341247
    11351248    switch (uMsg)
     
    11571270        case PGM_RECALCSIZE:
    11581271            return PAGER_RecalcSize(hwnd);
    1159 
     1272   
    11601273        case PGM_SETBKCOLOR:
    11611274            return PAGER_SetBkColor (hwnd, wParam, lParam);
     
    11861299
    11871300        case WM_WINDOWPOSCHANGING:
    1188             return PAGER_HandleWindowPosChanging (hwnd, (WINDOWPOS*)lParam);
     1301            return PAGER_HandleWindowPosChanging (hwnd, wParam, (WINDOWPOS*)lParam);
    11891302
    11901303        case WM_NCCALCSIZE:
     
    12051318            if (infoPtr->bForward && infoPtr->hwndChild)
    12061319                PostMessageA(infoPtr->hwndChild, WM_MOUSEMOVE, wParam, lParam);
    1207             return TRUE;
     1320            return TRUE;                       
    12081321
    12091322        case WM_MOUSELEAVE:
    1210             return PAGER_MouseLeave (hwnd, wParam, lParam);
     1323            return PAGER_MouseLeave (hwnd, wParam, lParam);     
    12111324
    12121325        case WM_LBUTTONDOWN:
     
    12201333/*
    12211334        case WM_PAINT:
    1222             return PAGER_Paint (hwnd, wParam);
     1335            return PAGER_Paint (hwnd, wParam); 
    12231336*/
    12241337        case WM_TIMER:
     
    12341347            {
    12351348                PAGER_Scroll(hwnd, infoPtr->direction);
    1236                 SetTimer(hwnd, TIMERID2, REPEAT_DELAY, 0);
     1349                SetTimer(hwnd, TIMERID2, REPEAT_DELAY, 0);         
    12371350            }
    12381351            break;
     
    12671380    wndClass.hbrBackground = 0;
    12681381    wndClass.lpszClassName = WC_PAGESCROLLERA;
    1269 
     1382 
    12701383    RegisterClassA (&wndClass);
    12711384}
Note: See TracChangeset for help on using the changeset viewer.