亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
精品剧情在线观看| 色综合婷婷久久| 精品国产伦一区二区三区观看方式| 青青草视频一区| 久久久青草青青国产亚洲免观| 韩国av一区二区三区四区| 国产午夜一区二区三区| 99久久er热在这里只有精品66| 亚洲欧美日韩电影| 欧美精三区欧美精三区| 麻豆91在线看| 国产精品久久国产精麻豆99网站| 色婷婷狠狠综合| 麻豆一区二区三| 国产精品日日摸夜夜摸av| 日本高清免费不卡视频| 日日摸夜夜添夜夜添亚洲女人| 精品毛片乱码1区2区3区| 成人av在线播放网站| 亚洲电影第三页| 日韩欧美www| 丁香六月综合激情| 午夜精品成人在线| 国产精品三级av| 欧美一区二区在线播放| www成人在线观看| 久久久久综合网| 自拍偷拍国产亚洲| 蜜桃视频一区二区| 91丝袜美腿高跟国产极品老师| 久久99国内精品| 91在线视频观看| 日韩美女视频在线| 亚洲一区二区精品3399| 美国av一区二区| 在线影院国内精品| 日韩三级.com| 亚洲成年人影院| 91网站在线观看视频| 久久色在线观看| 日本成人在线不卡视频| 91精品国产综合久久精品麻豆 | 久久99国内精品| 国产成人午夜99999| 国产91精品露脸国语对白| 在线免费观看日本欧美| 国产精品免费丝袜| 国产色产综合色产在线视频| 国产精品嫩草影院com| 久久精品噜噜噜成人av农村| 一区二区在线免费| 国产欧美一区二区在线观看| 欧美一区二区视频在线观看2022| 99久久99久久免费精品蜜臀| 国产最新精品精品你懂的| 麻豆精品视频在线观看视频| 亚洲乱码国产乱码精品精可以看| 久久久三级国产网站| 日韩中文字幕不卡| 欧美色手机在线观看| 免费在线视频一区| 精品日韩一区二区三区免费视频| 亚洲电影你懂得| 欧美精品一级二级| 日韩精品乱码免费| 久久午夜免费电影| 风间由美中文字幕在线看视频国产欧美| 精品国产免费一区二区三区四区| 奇米一区二区三区| 中文字幕av不卡| 欧美亚洲国产一卡| 久久99精品国产麻豆不卡| 2020国产精品自拍| 91婷婷韩国欧美一区二区| 一区二区三区四区在线免费观看| 欧美精品视频www在线观看| 蜜臀久久99精品久久久画质超高清| 久久视频一区二区| 色先锋久久av资源部| 国产经典欧美精品| 日韩电影在线一区二区| 国产色婷婷亚洲99精品小说| 久久不见久久见免费视频1| 一个色综合av| 国产精品久久精品日日| 久久久久久久国产精品影院| 久久精品久久综合| 久久亚洲二区三区| 91麻豆精品国产| 欧美情侣在线播放| 亚洲乱码日产精品bd| 色诱视频网站一区| 国产.欧美.日韩| 国产精品一区二区久激情瑜伽| 国产一区二区三区美女| 成人毛片视频在线观看| 99久精品国产| 欧美日韩一区三区四区| 56国语精品自产拍在线观看| 日韩欧美一区二区在线视频| 久久尤物电影视频在线观看| 欧美激情一区二区三区| 亚洲人成7777| 日韩高清中文字幕一区| 久久精工是国产品牌吗| 成人网在线免费视频| 日本乱人伦一区| 日韩欧美国产一区二区在线播放| 久久综合久久久久88| 国产视频一区在线观看| 一片黄亚洲嫩模| 久久国产尿小便嘘嘘尿| jiyouzz国产精品久久| 欧美日韩高清影院| 欧美精品一区二区高清在线观看 | 欧美影视一区在线| 精品日韩一区二区三区| 亚洲视频免费看| 日韩av高清在线观看| 成人性生交大片免费看在线播放| 欧美人妖巨大在线| 亚洲国产精品精华液ab| 亚洲不卡一区二区三区| 国产.欧美.日韩| 欧美一区二区视频在线观看2020 | 6080yy午夜一二三区久久| 国产视频在线观看一区二区三区| 亚洲一区二区在线播放相泽 | 国产精品久久久久aaaa樱花| 日韩va亚洲va欧美va久久| a在线欧美一区| 精品剧情在线观看| 午夜久久久影院| 9色porny自拍视频一区二区| 欧美成人一区二区三区在线观看| 亚洲人成影院在线观看| 国产不卡视频一区| 欧美不卡视频一区| 午夜精品福利久久久| av电影在线观看不卡| 久久蜜臀中文字幕| 看片网站欧美日韩| 欧美日韩精品一区二区三区四区| 国产精品视频免费| 国产精品影音先锋| 欧美电影免费观看高清完整版在线观看| 一区二区三区中文在线| 成人国产视频在线观看| 国产亚洲欧美日韩日本| 精品一区二区三区香蕉蜜桃| 69堂国产成人免费视频| 亚洲一区二区在线视频| 在线视频综合导航| 亚洲精品乱码久久久久久| 99视频精品在线| 国产日韩综合av| 国产高清精品在线| 久久久久久久久免费| 激情久久久久久久久久久久久久久久 | 精品国产3级a| 日本女人一区二区三区| 欧美日韩不卡视频| 亚洲国产精品一区二区www在线| 日本韩国视频一区二区| 亚洲精品国产高清久久伦理二区| 99久久精品99国产精品| 国产精品久久久久久久午夜片| 丁香啪啪综合成人亚洲小说 | 欧美一卡在线观看| 日韩中文字幕91| 91麻豆精品国产91久久久久| 美女尤物国产一区| 欧美r级电影在线观看| 国产一区二区三区蝌蚪| 久久精品一区二区三区不卡牛牛| 91久久奴性调教| 一区二区三区日韩在线观看| 在线看不卡av| 五月天欧美精品| 欧美videos大乳护士334| 国产精品66部| 中文字幕日本乱码精品影院| 色综合中文字幕国产 | 欧美人与性动xxxx| 奇米影视在线99精品| 精品动漫一区二区三区在线观看| 精品午夜一区二区三区在线观看| 精品国产sm最大网站免费看| 粉嫩aⅴ一区二区三区四区五区 | 亚洲精品视频在线| 欧美人伦禁忌dvd放荡欲情| 老司机午夜精品99久久| 2021国产精品久久精品| av电影在线观看完整版一区二区| 樱桃视频在线观看一区| 欧美乱妇一区二区三区不卡视频| 日韩精品电影在线| 中文字幕av在线一区二区三区| 色悠悠亚洲一区二区| 蜜桃视频一区二区三区在线观看|