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

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

?? pagemous.cpp

?? 英文版的 想要的話可以下載了 為大家服務
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/*
 * PAGEMOUS.CPP
 * Patron Chapter 21
 *
 * 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::OnRightDown
 *
 * Purpose:
 *  Called when the user clicks with the right button on this
 *  page.  If there is an object here, determined by the last
 *  hit-test code, the we'll make a popup-menu for 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::OnRightDown(UINT uKeys, UINT x, UINT y)
    {
    HMENU       hMenu;
    HMENU       hMenuRes;
    HINSTANCE   hInst;
    HWND        hWndFrame, hWndT;
    POINT       pt;
    UINT        i, cItems;

    //Select the tenant under the mouse, if there is one.
    if (!SelectTenantAtPoint(x, y))
        return FALSE;

    /*
     * Get the top-level window to which menu command will go.  This
     * will be whatever parent doesn't have a parent itself...
     */
    hWndT=GetParent(m_hWnd);

    while (NULL!=hWndT)
        {
        hWndFrame=hWndT;
        hWndT=GetParent(hWndT);
        }

    /*
     * Build a popup menu for this object with Cut, Copy, Delete,
     * and object verbs.
     */
    hInst=GETWINDOWINSTANCE(m_hWnd);    //Macro in BOOK1632.H
    hMenuRes=LoadMenu(hInst, MAKEINTRESOURCE(IDR_RIGHTPOPUPMENU));

    if (NULL==hMenuRes)
        return FALSE;

    hMenu=CreatePopupMenu();
    cItems=GetMenuItemCount(hMenuRes);

    for (i=0; i < cItems; i++)
        {
        TCHAR       szTemp[80];
        int         id, uFlags;

        GetMenuString(hMenuRes, i, szTemp, sizeof(szTemp)
            , MF_BYPOSITION);
        id=GetMenuItemID(hMenuRes, i);

        uFlags=(0==id) ? MF_SEPARATOR : MF_STRING | MF_ENABLED;
        AppendMenu(hMenu, uFlags, id, szTemp);
        }

    DestroyMenu(hMenuRes);

    //Munge the Object menu item
    m_pTenantCur->AddVerbMenu(hMenu, MENUPOS_OBJECTONPOPUP);

    //Enable or disable the Links item.
    i=FQueryLinksInPage() ? MF_ENABLED : MF_DISABLED | MF_GRAYED;
    EnableMenuItem(hMenu, IDM_EDITLINKS, i | MF_BYCOMMAND);

    SETPOINT(pt, x, y);
    ClientToScreen(m_hWnd, &pt);

    TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_RIGHTBUTTON
        , pt.x, pt.y, 0, hWndFrame, NULL);

    DestroyMenu(hMenu);
    return FALSE;
    }




/*
 * CPage::SelectTenantAtPoint
 *
 * Purpose:
 *  Selects whatever tenant is at the point (x,y) if there is one,
 *  deselecting the previously selected tenant.
 *
 * Parameters:
 *  x, y            UINT coordinates of the mouse.
 *
 * Return Value:
 *  BOOL            TRUE if there is a tenant here, FALSE otherwise.
 */

BOOL CPage::SelectTenantAtPoint(UINT x, UINT y)
    {
    UINT            iTenant;
    PCTenant        pTenant;
    PCDocument      pDoc;

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

    if (NULL==pTenant)
        return FALSE;

    //Make the document window active in any case
    pDoc=(PCDocument)SendMessage(GetParent(m_hWnd), DOCM_PDOCUMENT
        , 0, 0L);

    if (NULL!=pDoc)
        BringWindowToTop(pDoc->Window());

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

    //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 TRUE;
    }





/*
 * 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)
    {
    /*
     * 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;
        }

    /*
     * 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;
        }

    SelectTenantAtPoint(x, y);
    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;

    if (m_fSizePending || m_fDragPending)
        {
        m_fSizePending=FALSE;
        m_fDragPending=FALSE;

        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, 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;

    if (m_fSizePending || m_fDragPending)
        {
        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;
            BOOL        fSize=m_fSizePending;
            BOOL        fDrag=m_fDragPending;

            m_fSizePending=FALSE;
            m_fDragPending=FALSE;

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

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

            if (fSize)
                StartSizeTracking();

            /*
             * 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)
        {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费在线视频| 日韩欧美国产麻豆| 亚洲乱码中文字幕| 一本一道久久a久久精品 | 亚洲精品一卡二卡| 一本一道久久a久久精品综合蜜臀| 最近中文字幕一区二区三区| 99麻豆久久久国产精品免费优播| 亚洲同性gay激情无套| 在线国产电影不卡| 另类小说视频一区二区| 国产欧美中文在线| 欧美影院一区二区| 麻豆成人av在线| 国产精品久久看| 欧美色中文字幕| 国产精一区二区三区| 亚洲视频在线一区二区| 欧美精品一卡两卡| 国产精品一区2区| 一区二区在线观看视频| 日韩精品资源二区在线| kk眼镜猥琐国模调教系列一区二区 | 国产真实乱对白精彩久久| 中文字幕亚洲一区二区av在线| 99久久777色| 久久丁香综合五月国产三级网站| 国产精品国产馆在线真实露脸| 欧美精品免费视频| 成人在线视频一区| 日韩高清中文字幕一区| 国产精品素人一区二区| 884aa四虎影成人精品一区| 国产福利一区二区| 日本午夜精品视频在线观看| 国产精品大尺度| 精品国产乱码久久久久久久久| av一本久道久久综合久久鬼色| 婷婷一区二区三区| 亚洲视频狠狠干| 久久中文字幕电影| 精品污污网站免费看| 国产a精品视频| 日本欧美大码aⅴ在线播放| 亚洲欧洲中文日韩久久av乱码| 日韩精品中文字幕在线不卡尤物| 色婷婷狠狠综合| 不卡的av电影| 国产激情91久久精品导航| 性做久久久久久免费观看| 亚洲三级在线免费| 国产欧美久久久精品影院| 日韩三级.com| 欧美日韩国产天堂| 色偷偷久久一区二区三区| 成人高清av在线| 国产成都精品91一区二区三| 久久se这里有精品| 日本va欧美va欧美va精品| 午夜欧美大尺度福利影院在线看| 亚洲欧美成aⅴ人在线观看| 欧美国产欧美综合| 久久久久久久久免费| 欧美成人乱码一区二区三区| 欧美人牲a欧美精品| 欧美日韩亚洲综合在线 | 精品一区在线看| 人人精品人人爱| 三级一区在线视频先锋| 亚洲18色成人| 丝袜美腿高跟呻吟高潮一区| 午夜av一区二区三区| 亚洲不卡av一区二区三区| 亚洲综合成人网| 亚洲大型综合色站| 有码一区二区三区| 一区二区三区日韩欧美| 一区二区三区小说| 亚洲综合免费观看高清完整版在线| 亚洲欧美国产三级| 亚洲综合清纯丝袜自拍| 亚洲风情在线资源站| 日本在线播放一区二区三区| 琪琪久久久久日韩精品| 激情文学综合插| 国产999精品久久| 99久久精品免费| 在线观看成人免费视频| 欧美猛男超大videosgay| 欧美一级精品大片| 久久精品男人的天堂| 国产精品国产自产拍高清av| 亚洲人成在线播放网站岛国| 亚洲一区精品在线| 狂野欧美性猛交blacked| 国产美女精品人人做人人爽| 成人免费高清视频在线观看| 色94色欧美sute亚洲线路二 | 精品一区二区成人精品| 国产精品亚洲一区二区三区在线| 丰满少妇久久久久久久| 在线亚洲一区二区| 欧美电影免费观看完整版| 国产欧美一区二区三区沐欲| 亚洲欧美区自拍先锋| 日韩不卡一区二区| 成人免费视频一区| 欧美日韩中文另类| 久久人人爽人人爽| 亚洲一区二区三区视频在线 | 国产aⅴ综合色| 欧美调教femdomvk| 久久久噜噜噜久久人人看| 一区二区在线观看视频| 精品影视av免费| 色94色欧美sute亚洲线路二| 精品国产免费人成在线观看| 亚洲人精品一区| 国内外成人在线视频| 在线日韩一区二区| 26uuu精品一区二区三区四区在线| 亚洲婷婷综合色高清在线| 久久不见久久见免费视频1| 日本电影欧美片| 久久欧美一区二区| 日韩综合小视频| 波多野结衣中文字幕一区二区三区 | 亚洲精品国产成人久久av盗摄 | 亚洲一区在线观看网站| 国产精品一区二区x88av| 欧美疯狂做受xxxx富婆| 亚洲图片另类小说| 国产一区二区中文字幕| 在线不卡一区二区| 综合久久国产九一剧情麻豆| 国产在线国偷精品产拍免费yy| 91福利在线观看| 欧美韩国日本综合| 奇米888四色在线精品| 欧美在线观看视频在线| 国产精品日产欧美久久久久| 狠狠色丁香婷婷综合| 欧美一区二区三区不卡| 亚洲国产欧美另类丝袜| 91亚洲精品久久久蜜桃| 欧美高清一级片在线观看| 精品一区二区三区久久| 日韩午夜在线观看| 日本在线观看不卡视频| 884aa四虎影成人精品一区| 亚洲综合一区二区三区| 成人激情动漫在线观看| 欧美国产在线观看| 国产99久久精品| 欧美韩国日本不卡| 粉嫩在线一区二区三区视频| 久久无码av三级| 国产一区二区不卡| 久久久久99精品一区| 国产在线精品一区二区三区不卡| 精品久久久久久久久久久久久久久| 亚洲成人精品一区二区| 欧美日韩高清一区| 日韩成人午夜精品| 日韩一级大片在线观看| 久久精品国产久精国产爱| 欧美电影精品一区二区| 韩国av一区二区三区| 久久久九九九九| 成人综合婷婷国产精品久久蜜臀 | 欧美视频在线一区二区三区| 一区二区三区美女| 欧美日韩一区视频| 蜜桃av一区二区| 久久久亚洲精品一区二区三区| 国产精品一区二区久久精品爱涩 | 久久久久久电影| 成人免费视频网站在线观看| 中文字幕一区在线| 在线视频一区二区三区| 日韩av二区在线播放| 精品国产亚洲在线| 成人免费毛片片v| 亚洲综合视频在线观看| 日韩一级片网站| 九九精品视频在线看| 国产欧美一区二区三区鸳鸯浴| 91丨九色丨蝌蚪富婆spa| 午夜视频在线观看一区二区三区 | 成人综合婷婷国产精品久久免费| 中文字幕中文字幕一区| 欧美在线一二三四区| 美女久久久精品| 亚洲欧洲日韩综合一区二区| 欧美日韩国产经典色站一区二区三区 | 久久影院午夜论| 99re热视频精品| 亚洲国产精品一区二区久久恐怖片| 欧美男女性生活在线直播观看| 国产麻豆日韩欧美久久|