亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pagemous.cpp

?? 英文版的 想要的話可以下載了 為大家服務
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/*
 * PAGEMOUS.CPP
 * Patron Chapter 13
 *
 * Implementation of mouse-related member functions of CPage.
 * The remainder is in PAGE.CPP.  This separate file keeps this
 * grungy hit-testing/drawing code out of our way.
 *
 * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
 *
 * Kraig Brockschmidt, Microsoft
 * Internet  :  kraigb@microsoft.com
 * Compuserve:  >INTERNET:kraigb@microsoft.com
 */


#include "patron.h"


//Lookups into the array using g_rgHTCode[x+y*3] in PAGEMOUS.CPP
#define YTOP            0
#define YMID            1
#define YBOT            2
#define XLEFT           0
#define XMID            1
#define XRIGHT          2

//Values to restrict sizing in CPage::OnMouseMove
#define SIZINGTOP       0x0001
#define SIZINGBOTTOM    0x0002
#define SIZINGLEFT      0x0004
#define SIZINGRIGHT     0x0008


//This array is for hit-testing lookups
static UINT g_rgHTCode[9]={HTTOPLEFT, HTTOP, HTTOPRIGHT
    , HTLEFT, HTCLIENT, HTRIGHT, HTBOTTOMLEFT, HTBOTTOM
    , HTBOTTOMRIGHT};


//This is for restricting tracking based on the hit-test
static UINT g_rguSizingFlags[9]={SIZINGTOP | SIZINGLEFT, SIZINGTOP
    , SIZINGTOP | SIZINGRIGHT, SIZINGLEFT, 0, SIZINGRIGHT
    , SIZINGBOTTOM | SIZINGLEFT, SIZINGBOTTOM
    , SIZINGBOTTOM | SIZINGRIGHT};



/*
 * CPage::OnLeftDown
 *
 * Purpose:
 *  Called when the user clicks with the left button on this page.
 *  We find the object under that position that is visibly on top
 *  (always the first one under this location in the page list since
 *  we paint in reverse order) and select it.
 *
 * Parameters:
 *  uKeys           UINT carrying the key state.
 *  x, y            UINT coordinates of the click in device units.
 *
 * Return Value:
 *  BOOL            Indicates if the action changed the object.
 */

BOOL CPage::OnLeftDown(UINT uKeys, UINT x, UINT y)
    {
    UINT        iTenant;
    PCTenant    pTenant;

    //CHAPTER13MOD
    /*
     * If the mouse is in a position to start dragging,
     * start the timer as with sizing below.
     */
    if (HTCAPTION==m_uHTCode)
        {
        m_fDragPending=TRUE;

        //Save down point and start timer.
        m_ptDown.x=x;
        m_ptDown.y=y;

        m_uKeysDown=uKeys;

        m_fTimer=TRUE;
        SetTimer(m_hWnd, IDTIMER_DEBOUNCE, m_cDelay, NULL);
        return FALSE;
        }
    //End CHAPTER13MOD

    /*
     * If the mouse is in a position to start sizing, start
     * the debounce timer and note the condition.  The sizing
     * will start in OnTimer or OnMouseMove.  This will always
     * happen on the currently selected tenant, and m_uHTCode is
     * set in OnNCHitTest below.
     */
    if (HTNOWHERE!=m_uHTCode && HTCLIENT!=m_uHTCode)
        {
        m_fSizePending=TRUE;

        //Save down point and start timer.
        m_ptDown.x=x;
        m_ptDown.y=y;

        m_fTimer=TRUE;
        SetTimer(m_hWnd, IDTIMER_DEBOUNCE, m_cDelay, NULL);
        return FALSE;
        }

    iTenant=TenantFromPoint(x, y, &pTenant);

    if (NULL==pTenant)
        return FALSE;

    //If this one is already current, we might be now sizing.
    if (pTenant==m_pTenantCur)
        return FALSE;

    //Deselect the current tenant
    if (NULL!=m_pTenantCur)
        m_pTenantCur->Select(FALSE);

    //Move this tenant to the top of the list
    m_iTenantCur=0;

    SendMessage(m_hWndTenantList, LB_DELETESTRING, iTenant, 0L);
    SendMessage(m_hWndTenantList, LB_INSERTSTRING, 0,(LONG)pTenant);

    //Select and repaint the new tenant to show it up front
    m_pTenantCur=pTenant;

    m_pTenantCur->Repaint();
    m_pTenantCur->Select(TRUE);

    return FALSE;
    }






/*
 * CPage::OnLeftUp
 *
 * Purpose:
 *  Called when the user clicks up with the left button on this
 *  page. We stop tracking on this message, if necessary, and
 *  resize the object.
 *
 * Parameters:
 *  uKeys           UINT carrying the key state.
 *  x, y            UINT coordinates of the click in device units.
 *
 * Return Value:
 *  BOOL            Indicates if this action changed the object.
 */

BOOL CPage::OnLeftUp(UINT uKeys, UINT x, UINT y)
    {
    RECT    rc, rcT;

    //CHAPTER13MOD
    if (m_fSizePending || m_fDragPending)
    //End CHAPTER13MOD
        {
        m_fSizePending=FALSE;
        //CHAPTER13MOD
        m_fDragPending=FALSE;
        //#nd CHAPTER13MOD

        if (m_fTimer)
            {
            KillTimer(m_hWnd, IDTIMER_DEBOUNCE);
            m_fTimer=FALSE;
            }

        return FALSE;
        }

    if (!m_fTracking)
        return FALSE;

    //Remove the dotted rectangle.
    RECTFROMRECTL(rc, m_rcl)
    DrawFocusRect(m_hDC, &rc);
    ReleaseDC(m_hWnd, m_hDC);

    ReleaseCapture();
    m_fTracking=FALSE;

    //If the original and new rects are the same, nothing happened.
    RECTFROMRECTL(rcT, m_rclOrg);

    if (EqualRect(&rc, &rcT))
        return FALSE;

    RECTFROMRECTL(rcT, m_rclOrg);
    InvalidateRect(m_hWnd, &rcT, TRUE);

    //Invalidate on the screen before accounting for scrolling
    InvalidateRect(m_hWnd, &rc, TRUE);

    //Factor in scrolling and tell the tenant where it now stands.
    OffsetRect(&rc, (int)m_pPG->m_xPos, (int)m_pPG->m_yPos);
    RECTLFROMRECT(m_rcl, rc);
    m_pTenantCur->RectSet(&m_rcl, TRUE);

    UpdateWindow(m_hWnd);
    return TRUE;
    }





/*
 * CPage::OnLeftDoubleClick
 *
 * Purpose:
 *  Called when the user double-clicks with the left button on this
 *  page.  We find the object under that position that is visibly on
 *  top (always the first one under this location in the page list
 *  since we paint in reverse order) and activate it.
 *
 * Parameters:
 *  uKeys           UINT carrying the key state.
 *  x, y            UINT coordinates of the click in device units.
 *
 * Return Value:
 *  BOOL            Indicates if the action changed the object.
 */

BOOL CPage::OnLeftDoubleClick(UINT uKeys, UINT x, UINT y)
    {
    /*
     * The current tenant is the only one that can be activated, so
     * we just have to make sure the mouse is there.  For that we
     * can use the last hit-test code we saw since it's updated on
     * every mouse move.
     */

    if (HTNOWHERE!=m_uHTCode)
        return m_pTenantCur->Activate(OLEIVERB_PRIMARY);

    return FALSE;
    }






/*
 * CPage::OnMouseMove
 *
 * Purpose:
 *  Processes WM_MOUSEMOVE on a page so we can handle tracking
 *  resize of a tenant.
 *
 * Parameters:
 *  x, y            int device coordinates to check.
 *
 * Return Value:
 *  None
 */

void CPage::OnMouseMove(UINT uKeys, int x, int y)
    {
    RECT        rc, rcO, rcB;
    int         cxy;

    //CHAPTER13MOD
    if (m_fSizePending || m_fDragPending)
    //End CHAPTER13MOD
        {
        int     dx, dy;

        dx=(x > m_ptDown.x) ? (x-m_ptDown.x) : (m_ptDown.x-x);
        dy=(y > m_ptDown.y) ? (y-m_ptDown.y) : (m_ptDown.y-y);

        /*
         * Has the mouse moved outside the debounce distance?  If
         * so, we can start sizing.  Note that this happens
         * regardless of the timer state.
         */
        if (dx > m_cxyDist || dy > m_cxyDist)
            {
            POINT       pt;
            //CHAPTER13MOD
            BOOL        fSize=m_fSizePending;
            BOOL        fDrag=m_fDragPending;

            m_fSizePending=FALSE;
            m_fDragPending=FALSE;
            //End CHAPTER13MOD

            if (m_fTimer)
                {
                KillTimer(m_hWnd, IDTIMER_DEBOUNCE);
                m_fTimer=FALSE;
                }

            //CHAPTER13MOD
            if (fDrag)
                {
                //Set dirty flag if drag & drop changed things.
                m_pPG->m_fDirty |= DragDrop(m_uKeysDown, x, y);
                return;
                }

            if (fSize)
                StartSizeTracking();
            //End CHAPTER13MOD

            /*
             * Since we might have moved out of the sizing handle
             * in order to start the operation, we need to set the
             * m_uSizingFlags field based on the original down point
             * for subsequent mouse moves to function properly.
             * Note that OnNCHitTest expects screen coordinates.
             */
            SETPOINT(pt, m_ptDown.x, m_ptDown.y);
            ClientToScreen(m_hWnd, &pt);
            OnNCHitTest(pt.x, pt.y);
            OnSetCursor(m_uHTCode);
            return;
            }
        }

    if (!m_fTracking)
        return;

    //Get rid of the old rectangle.
    RECTFROMRECTL(rc, m_rcl)
    DrawFocusRect(m_hDC, &rc);

    /*
     * Calculate the new.  The flags in m_uSizingFlags tell us what
     * to change.  We limit the object by the page margins and a
     * minimum size of 3*CXYHANDLE in either dimension.
     */
    cxy=3*CXYHANDLE;

    RECTFROMRECTL(rcO, m_rclOrg);
    RECTFROMRECTL(rcB, m_rclBounds);

    if (m_uSizingFlags & SIZINGTOP)
        {
        if (y >= rcO.bottom-cxy)
            y=rcO.bottom-cxy;

        if (y <= rcB.top)           //Limit to top of page.
            y=rcB.top;

        m_rcl.top=y;
        }

    if (m_uSizingFlags & SIZINGBOTTOM)
        {
        if (y <= rcO.top+cxy)
            y=rcO.top+cxy;

        if (y >= rcB.bottom)         //Limit to bottom of page.
            y=rcB.bottom;

        m_rcl.bottom=y;
        }

    if (m_uSizingFlags & SIZINGLEFT)
        {
        if (x >= rcO.right-cxy)
            x=rcO.right-cxy;

        if (x <= rcB.left)           //Limit to left of page.
            x=rcB.left;

        m_rcl.left=x;
        }

    if (m_uSizingFlags & SIZINGRIGHT)
        {
        if (x <= rcO.left+cxy)
            x=rcO.left+cxy;

        if (x >= rcB.right)          //Limit to right of page.
            x=rcB.right;

        m_rcl.right=x;
        }


    //Draw the new
    RECTFROMRECTL(rc, m_rcl)
    DrawFocusRect(m_hDC, &rc);

    return;
    }




/*
 * CPage::OnTimer
 *
 * Purpose:
 *  Processes WM_TIMER messages to a page used to perform mouse
 *  debouncing.
 *
 * Parameters:
 *  uID             UINT timer ID.
 *
 * Return Value:
 *  None
 */

void CPage::OnTimer(UINT uID)
    {
    //CHAPTER13MOD
    if (m_fSizePending || m_fDragPending)
        {
        BOOL        fSize=m_fSizePending;
        BOOL        fDrag=m_fDragPending;

        /*
         * Having this function called means the delay requirement
         * is satisfied.  Start tracking for sizing or dragging.
         */

        m_fSizePending=FALSE;
        m_fDragPending=FALSE;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品网站一区| 欧美自拍偷拍一区| 在线一区二区三区| 制服丝袜一区二区三区| 精品99久久久久久| 一区精品在线播放| 日韩国产欧美三级| 国产精品性做久久久久久| 一本一道综合狠狠老| 91精品午夜视频| 国产精品丝袜一区| 亚洲成a人片在线不卡一二三区| 久久av中文字幕片| 99久久精品国产麻豆演员表| 欧美电影在线免费观看| 国产欧美日韩亚州综合| 一区二区三区电影在线播| 久久草av在线| 91美女片黄在线| 欧美成人午夜电影| 一区二区三区日韩欧美| 精品一区二区国语对白| 色婷婷精品久久二区二区蜜臂av| 56国语精品自产拍在线观看| 国产精品视频看| 日产精品久久久久久久性色| 成人少妇影院yyyy| 日韩小视频在线观看专区| 中文字幕日韩一区二区| 裸体一区二区三区| 在线一区二区三区四区五区| 国产亚洲欧美色| 亚洲成人一区在线| 99久久精品免费| 2020国产精品| 日韩中文字幕区一区有砖一区| 国产精品夜夜爽| 欧美一二三区在线| 夜色激情一区二区| 成人免费黄色在线| 日韩视频一区二区| 亚洲va欧美va人人爽| 99久久国产综合精品色伊| 久久久99精品免费观看不卡| 免费一区二区视频| 欧美日韩一区小说| 亚洲日韩欧美一区二区在线| 国产高清精品网站| 欧美一区二区大片| 亚洲国产va精品久久久不卡综合| www.亚洲色图| 国产三级一区二区| 国产一级精品在线| 精品国偷自产国产一区| 五月婷婷综合网| 欧美在线免费视屏| 亚洲视频一二三| 97精品电影院| 国产精品麻豆视频| 懂色av中文一区二区三区| 精品美女在线观看| 蜜桃精品在线观看| 5566中文字幕一区二区电影| 亚洲国产美女搞黄色| 91网页版在线| 亚洲私人影院在线观看| aa级大片欧美| 国产精品国产馆在线真实露脸| 国产伦精品一区二区三区免费| 日韩欧美视频在线| 免费成人av资源网| 日韩欧美视频在线| 国模一区二区三区白浆| 久久综合色综合88| 国产曰批免费观看久久久| 精品精品国产高清一毛片一天堂| 另类欧美日韩国产在线| 欧美大片在线观看| 国产在线精品一区二区| 精品日韩成人av| 国产伦精品一区二区三区免费 | 中文一区在线播放| 成人av一区二区三区| 中文字幕日本不卡| 99re这里都是精品| 亚洲综合成人在线视频| 在线电影院国产精品| 男女激情视频一区| 国产日产欧美一区二区视频| 成人黄色综合网站| 亚洲欧美一区二区三区久本道91 | 亚洲国产日韩一级| 91精品国产91综合久久蜜臀| 蜜桃免费网站一区二区三区| 精品理论电影在线| av在线一区二区| 一区二区在线观看免费| 欧美日韩一区二区欧美激情| 午夜伦欧美伦电影理论片| 91麻豆精品国产91久久久久久久久 | 青娱乐精品视频在线| 欧美xxxxxxxx| 成人免费观看视频| 亚洲午夜电影网| 日韩免费电影网站| 成人在线视频一区| 亚洲一区免费视频| 精品国产自在久精品国产| 成人小视频免费在线观看| 一区二区三区视频在线观看| 欧美一区二区成人| 成人永久免费视频| 亚洲国产日产av| 精品福利一二区| 91色九色蝌蚪| 日本不卡在线视频| 亚洲国产精品精华液2区45| 色婷婷久久一区二区三区麻豆| 日韩一区欧美二区| 国产精品网曝门| 宅男噜噜噜66一区二区66| 成人免费毛片a| 免费高清在线视频一区·| 国产精品久久久久久福利一牛影视| 色菇凉天天综合网| 理论片日本一区| 亚洲精品免费在线播放| 精品欧美一区二区久久| 99精品欧美一区二区三区小说| 日韩精品乱码av一区二区| 国产欧美va欧美不卡在线| 欧美日韩一卡二卡三卡| 国产成人av影院| 日韩精品电影在线| 亚洲麻豆国产自偷在线| 亚洲精品一区二区三区99| 欧洲一区二区三区免费视频| 国产伦理精品不卡| 天堂蜜桃91精品| 亚洲视频一区二区在线观看| 26uuu另类欧美| 欧美日韩成人一区二区| 9色porny自拍视频一区二区| 美女精品自拍一二三四| 亚洲精品你懂的| 亚洲国产精品传媒在线观看| 欧美一区二区高清| 在线亚洲一区观看| 99久久婷婷国产综合精品电影| 久久国产精品99精品国产| 亚洲另类在线视频| 国产亚洲欧美日韩在线一区| 51午夜精品国产| 欧美在线播放高清精品| 国产盗摄一区二区三区| 免费成人结看片| 婷婷综合另类小说色区| 日韩毛片在线免费观看| 久久精品一区二区三区不卡| 91麻豆精品国产91久久久资源速度 | 日韩一级片网站| 欧美精品丝袜中出| 一本色道a无线码一区v| 福利91精品一区二区三区| 免费一级片91| 日产精品久久久久久久性色| 亚洲午夜免费电影| 依依成人精品视频| 日韩码欧中文字| 中文字幕电影一区| 久久精品日产第一区二区三区高清版| 777精品伊人久久久久大香线蕉| 日本高清无吗v一区| 色综合久久久网| 91亚洲午夜精品久久久久久| 不卡的av网站| 成人精品在线视频观看| 成人中文字幕合集| 成人教育av在线| 国产成人av网站| 国产 欧美在线| www.日韩精品| www.久久久久久久久| av一区二区三区黑人| 丁香五精品蜜臀久久久久99网站 | 亚洲国产经典视频| 中文字幕va一区二区三区| 中文字幕av一区二区三区免费看 | 一本到不卡精品视频在线观看| 99精品久久久久久| 色偷偷久久人人79超碰人人澡| 91网站在线观看视频| 在线日韩一区二区| 欧美日韩综合不卡| 欧美肥大bbwbbw高潮| 日韩欧美你懂的| 久久久久久一级片| 中文字幕一区二区三区色视频| 中文字幕综合网| 亚洲一区二区在线视频|