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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cdocumnt.cpp

?? 英文版的 想要的話可以下載了 為大家服務(wù)
?? CPP
字號:
/*
 * CDOCUMNT.CPP
 * Sample Code Class Libraries
 *
 * Implementation of the CDocument class.
 *
 * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
 *
 * Kraig Brockschmidt, Microsoft
 * Internet  :  kraigb@microsoft.com
 * Compuserve:  >INTERNET:kraigb@microsoft.com
 */


#include <windows.h>
#include <string.h>
#include "classlib.h"


/*
 * CDocument::CDocument
 * CDocument::~CDocument
 *
 * Constructor Parameters:
 *  hInst           HINSTANCE of the application.
 *  pFR             PCFrame, a back pointer to the frame window.
 *  pAdv            PCDocumentAdviseSink to notify on events.
 */

CDocument::CDocument(HINSTANCE hInst, PCFrame pFR
    , PCDocumentAdviseSink pAdv)
    : CWindow(hInst)
    {
    m_pFR=pFR;
    m_pST=NULL;
    m_pAdv=pAdv;
    return;
    }


CDocument::~CDocument(void)
    {
    if (NULL!=m_pST)
        delete m_pST;

    return;
    }






/*
 * CDocument::Init
 *
 * Purpose:
 *  Initializes an already created document window.  The client
 *  actually creates the window then passes that here for further
 *  initialization.
 *
 * Parameters:
 *  pDI             PDOCUMENTINIT containing initialization params
 *
 * Return Value:
 *  BOOL            TRUE if the function succeeded, FALSE otherwise.
 */

BOOL CDocument::Init(PDOCUMENTINIT pDI)
    {
    if (NULL==pDI)
        return FALSE;

    if (NULL==pDI->hWndDoc)
        return FALSE;

    //Create our stringtable
    m_pST=new CStringTable(m_hInst);

    if (!m_pST->Init(pDI->idsMin, pDI->idsMax))
        return FALSE;

    m_hWnd=pDI->hWndDoc;
    m_cf=RegisterClipboardFormat(PSZ(IDS_CLIPBOARDFORMAT));

    m_fDirty=FALSE;
    m_fNoDirty=FALSE;
    m_fNoSize=FALSE;

    m_fFileKnown=FALSE;
    m_szFile[0]=0;

    return TRUE;
    }








/*
 * CDocument::FMessageHook
 *
 * Purpose:
 *  Provides a derivation of the base CDocument class to hook all
 *  messages to the window procedure for special processing,
 *  including WM_COMMAND since that is much less common for a
 *  document than for a frame (see CFrame::OnCommand).
 *
 * Parameters:
 *  <WndProc Parameters>
 *  pLRes           LRESULT * in which to store the return value
 *                  for the message.
 *
 * Return Value:
 *  BOOL            TRUE to prevent further processing, FALSE
 *                  otherwise.
 */

BOOL CDocument::FMessageHook(HWND hWnd, UINT iMsg, WPARAM wParam
    , LPARAM lParam, LRESULT *pLRes)
    {
    *pLRes=0;
    return FALSE;
    }






/*
 * CDocument::FDirtySet
 *
 * Purpose:
 *  Sets or clears the document 'dirty' flag returning the previous
 *  state of that same flag.
 *
 * Parameters:
 *  fDirty          BOOL indicating the new contents of the dirty
 *                  flag.
 *
 * Return Value:
 *  BOOL            Previous value of the dirty flag.
 */

BOOL CDocument::FDirtySet(BOOL fDirty)
    {
    BOOL        fPrevious;

    /*
     * If we are a hidden window, then there's nothing that could
     * make us dirty since there cannot be any user interaction here.
     */
    if (!IsWindowVisible(m_hWnd))
        return m_fDirty;

    //Ignore the initial WM_SIZE on creation.
    if (m_fNoDirty)
        return m_fDirty;

    fPrevious=m_fDirty;
    m_fDirty=fDirty;

    return fPrevious;
    }





/*
 * CDocument::FDirtyGet
 *
 * Purpose:
 *  Returns the current dirty status of the document.
 *
 * Parameters:
 *  None
 *
 * Return Value:
 *  BOOL            TRUE if the file is clean, FALSE otherwise.
 */

BOOL CDocument::FDirtyGet()
    {
    return m_fDirty;
    }





/*
 * CDocument::Clear
 *
 * Purpose:
 *  Sets all contents in the document back to defaults with no
 *  filename.
 *
 * Paramters:
 *  None
 *
 * Return Value:
 *  None
 */

void CDocument::Clear()
    {
    FDirtySet(FALSE);
    Rename(NULL);
    return;
    }






/*
 * CDocument::Load
 *
 * Purpose:
 *  Function that derived classes override.  Does nothing in base
 *  class.
 *
 * Parameters:
 *  fChangeFile     BOOL indicating if we're to update the window
 *                  title and the filename from using this file.
 *  pszFile         LPTSTR to the filename to load.  If NULL then this
 *                  is a new, untitled file, so perform any
 *                  initialization for such a case.
 *
 * Return Value:
 *  UINT            An error value from DOCERR_.  Always
 *                  DOCERR_NOFILE here.
 */

UINT CDocument::Load(BOOL fChangeFile, LPTSTR pszFile)
    {
    Rename(NULL);
    return DOCERR_NOFILE;
    }







/*
 * CDocument::Save
 *
 * Purpose:
 *  Function that derived classes override.  Does nothing in base
 *  class.
 *
 * Parameters:
 *  uType           UINT type of file to save (from Save As dialog).
 *  pszFile         LPTSTR providing the name under which we should
 *                  save.  If NULL, then use the current name.  If
 *                  non-NULL, then call Rename if save is successful
 *                  and the name has changed.
 * Return Value:
 *  UINT            An error value from DOCERR_.  Always
 *                  DOCERR_NOFILE here.
 */

UINT CDocument::Save(UINT uType, LPTSTR pszFile)
    {
    return DOCERR_NOFILE;
    }





/*
 * CDocument::ErrorMessage
 *
 * Purpose:
 *  Displays an error message to the user appropriate for a given
 *  error code.  If the code is DOCERR_NONE then this is a NOP.
 *
 * Parameters:
 *  uErr            UINT identifying the error code.
 *
 * Return Value:
 *  None
 */

void CDocument::ErrorMessage(UINT uErr)
    {
    LPTSTR      psz;

    switch (uErr)
        {
        case DOCERR_NONE:
            psz=NULL;
            break;

        case DOCERR_NOFILE:
            psz=PSZ(IDS_FILEDOESNOTEXIST);
            break;

        case DOCERR_COULDNOTOPEN:
            psz=PSZ(IDS_FILEOPENERROR);
            break;

        case DOCERR_READFAILURE:
            psz=PSZ(IDS_FILELOADERROR);
            break;

        case DOCERR_UNSUPPORTEDVERSION:
            psz=PSZ(IDS_VERSIONMISMATCH);
            break;

        case DOCERR_WRITEFAILURE:
            psz=PSZ(IDS_FILESAVEERROR);
            break;

        case DOCERR_CANCELLED:
            //No message on this.
            return;

        default:
            psz=PSZ(IDS_UNKNOWNERROR);
            break;
        }

    if (NULL!=psz)
        MessageBox(m_hWnd, psz, PSZ(IDS_DOCUMENTCAPTION), MB_OK);

    return;
    }










/*
 * CDocument::Clip
 *
 * Purpose:
 *  Places document data on the clipboard, optionally implementing
 *  Cut by deleting the data in the current window after rendering.
 *
 * Parameters:
 *  hWndFrame       HWND of the main window.
 *  fCut            BOOL indicating cut (TRUE) or copy (FALSE).
 *
 * Return Value:
 *  BOOL            TRUE if successful, FALSE otherwise.
 */

BOOL CDocument::Clip(HWND hWndFrame, BOOL fCut)
    {
    return FALSE;
    }




/*
 * CDocument::RenderFormat
 *
 * Purpose:
 *  Returns a global memory handle containing a specific clipboard
 *  format.
 *
 * Parameters:
 *  cf              UINT format to render
 *
 * Return Value:
 *  HGLOBAL         Memory handle of the rendering.
 */

HGLOBAL CDocument::RenderFormat(UINT cf)
    {
    return NULL;
    }






/*
 * CDocument::FQueryPaste
 *
 * Purpose:
 *  Determines if we can paste data from the clipboard.
 *
 * Parameters:
 *  None
 *
 * Return Value:
 *  BOOL            TRUE if data is available, FALSE otherwise.
 */

BOOL CDocument::FQueryPaste(void)
    {
    return IsClipboardFormatAvailable(m_cf);
    }





/*
 * CDocument::Paste
 *
 * Purpose:
 *  Retrieves the private data format from the clipboard and sets it
 *  as the current data.
 *
 *  Note that if this function is called, then the clipboard format
 *  is available because the Paste menu item is only enabled if the
 *  format is present.
 *
 * Parameters:
 *  hWndFrame       HWND of the main window
 *
 * Return Value:
 *  BOOL            TRUE if successful, FALSE otherwise.
 */

BOOL CDocument::Paste(HWND hWndFrame)
    {
    return FALSE;
    }







/*
 * CDocument::Undo
 *
 * Purpose:
 *  Reverses a previous action.
 *
 * Parameters:
 *  None
 *
 * Return Value:
 *  None
 */

void CDocument::Undo(void)
    {
    return;
    }






/*
 * CDocument::FQuerySave
 *
 * Purpose:
 *  Returns whether or not a call to FSave will work.
 *
 * Parameters:
 *  None
 *
 * Return Value:
 *  BOOL            TRUE if we have a known file, FALSE otherwise.
 */

BOOL CDocument::FQuerySave(void)
    {
    return m_fFileKnown;
    }






/*
 * CDocument::Rename
 *
 * Purpose:
 *  Changes the name of the current file we're dealing with but
 *  does no disk action.  FSave should be used after this
 *  call to implement a Save As operation.
 *
 * Parameters:
 *  pszFile         LPTSTR to the filename to save ourselves under.
 *
 * Return Value:
 *  None
 */

void CDocument::Rename(LPTSTR pszFile)
    {
    //Clear out the filename on pszFile==NULL.
    if (NULL==pszFile)
        {
        m_szFile[0]=0;
        m_fFileKnown=FALSE;

        //Tell the associate window to change captions.
        if (NULL!=m_pAdv)
            m_pAdv->OnCaptionChange(this);
        }

    //First, check if anything changed
    if (NULL!=pszFile && 0!=lstrcmpi(m_szFile, pszFile))
        {
        /*
         * Copy the new filename to the document structure and inform
         * associate
         */
        lstrcpyn(m_szFile, pszFile, CCHPATHMAX);

        if (NULL!=m_pAdv)
            m_pAdv->OnCaptionChange(this);

        m_fFileKnown=TRUE;
        }

    return;
    }





/*
 * CDocument::FilenameGet
 *
 * Purpose:
 *  Retrieves the current filename used in the document.
 *
 * Parameters:
 *  psz             LPTSTR in which to store the filename.
 *  cchMax          UINT maximum number of characters to copy.
 *
 * Return Value:
 *  UINT            Number of characters copied.
 */

UINT CDocument::FilenameGet(LPTSTR psz, UINT cchMax)
    {
    UINT        uRet=0;

    if (NULL!=psz)
        {
        lstrcpyn(psz, m_szFile, cchMax);
        uRet=lstrlen(m_szFile);
        }

    return uRet;
    }




/*
 * CDocument::FrameGet
 *
 * Purpose:
 *  Returns the CFrame pointer of the application frame.
 *
 * Parameters:
 *  None
 *
 * Return Value:
 *  PCFrame         Pointer to the frame object.
 */

PCFrame CDocument::FrameGet(void)
    {
    return m_pFR;
    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美色图第一页| 在线免费一区三区| 午夜久久久影院| 国产精品美女久久福利网站| 欧美日韩一区在线| 国产成人av在线影院| 亚洲精品美腿丝袜| 国产免费久久精品| 欧美一区二区成人| 日本高清免费不卡视频| 高清视频一区二区| 免费日韩伦理电影| 天天综合日日夜夜精品| 国产精品国产三级国产aⅴ原创| 欧美日韩www| www.成人在线| 国产精品99久久久久久久vr| 一区二区中文字幕在线| 欧美一区午夜视频在线观看| 欧美调教femdomvk| 欧美视频你懂的| 日本黄色一区二区| 色噜噜狠狠成人网p站| 97精品电影院| 在线精品视频一区二区| 欧美亚洲国产一区在线观看网站 | 亚洲不卡在线观看| 亚洲一二三区在线观看| 天天av天天翘天天综合网| 亚洲va天堂va国产va久| 日韩国产精品大片| 国产精品欧美综合在线| 久久亚洲综合色一区二区三区| 欧美日韩日日夜夜| 色88888久久久久久影院按摩| 色综合天天综合网国产成人综合天 | 在线播放中文字幕一区| 欧美久久久久久蜜桃| 欧美人牲a欧美精品| 日韩欧美国产精品| 欧美国产日韩在线观看| 中文字幕亚洲不卡| 午夜精品久久久久| 国产一区二区三区视频在线播放| 成人三级伦理片| 91成人免费网站| 亚洲精品在线网站| 夜夜亚洲天天久久| 国产精品夜夜嗨| 欧美一区二区三区日韩视频| 亚洲视频一区在线| 成人久久18免费网站麻豆| 欧美一卡二卡三卡| 亚洲欧美一区二区在线观看| 日本欧美久久久久免费播放网| 国产精品一级在线| 日韩欧美在线影院| 一区二区国产视频| av在线播放一区二区三区| 精品国产乱码久久久久久免费| 午夜精品久久久久久久久久| 日本久久电影网| 亚洲欧美激情视频在线观看一区二区三区 | av一区二区三区黑人| 精品日韩成人av| 日韩激情中文字幕| 欧美性xxxxxxxx| 伊人色综合久久天天人手人婷| 99国产一区二区三精品乱码| 亚洲视频小说图片| 日本乱人伦一区| 一区二区中文字幕在线| 国产一区二区视频在线播放| 制服视频三区第一页精品| 亚洲自拍偷拍图区| 欧美制服丝袜第一页| 亚洲色图第一区| 色婷婷av一区二区三区大白胸| 国产精品国产自产拍高清av| 欧美日韩一区二区三区在线看| 午夜久久电影网| 日韩一级片网址| 亚洲女同ⅹxx女同tv| 色婷婷综合久久久| 一区二区日韩电影| 欧美精品 国产精品| 麻豆精品精品国产自在97香蕉| 日韩欧美一区二区视频| 国内精品视频一区二区三区八戒| 亚洲国产精品精华液2区45| www.一区二区| 久久69国产一区二区蜜臀| 国产精品久久久久久亚洲毛片| 欧美偷拍一区二区| 高清国产午夜精品久久久久久| 亚洲精品视频免费看| 69av一区二区三区| 床上的激情91.| 一区二区三区不卡视频| 91精品国产91热久久久做人人 | 国产精品久久久一本精品| 欧美丰满高潮xxxx喷水动漫| 国产最新精品精品你懂的| 亚洲三级电影全部在线观看高清| 欧美情侣在线播放| 91视频一区二区| 国产成人亚洲综合a∨婷婷图片| 一区二区在线观看不卡| 久久免费视频色| 欧美日韩精品专区| 91免费视频网址| 成人avav在线| 色综合色狠狠综合色| 蜜臀久久久99精品久久久久久| 久久久.com| 欧美一级黄色片| 欧美色电影在线| 在线视频国内一区二区| 激情综合亚洲精品| 亚欧色一区w666天堂| 国产精品久久久久天堂| 久久久久久毛片| 久久精品这里都是精品| 精品88久久久久88久久久| 欧美日本一区二区三区四区| 一本大道久久a久久精品综合| 国产91高潮流白浆在线麻豆| 国产91丝袜在线播放0| 国产老妇另类xxxxx| 日韩影视精彩在线| 日日夜夜一区二区| 日本va欧美va精品| 国内精品嫩模私拍在线| 国产精品66部| 成人福利视频在线看| 色老头久久综合| 精品少妇一区二区三区在线播放| 久久综合久色欧美综合狠狠| 精品国产伦理网| 国产精品福利一区二区三区| 亚洲天堂福利av| 偷拍日韩校园综合在线| 国产在线视视频有精品| 色综合色综合色综合| 7799精品视频| 欧美极品少妇xxxxⅹ高跟鞋| 欧美偷拍一区二区| 国产乱人伦精品一区二区在线观看| 成人性生交大片免费| 欧美性色黄大片| 国产精品久久一卡二卡| 日本亚洲天堂网| 国产不卡在线一区| 精品视频在线视频| 国产日本欧洲亚洲| 日本成人中文字幕在线视频 | 国产精品污网站| 老司机精品视频导航| 91理论电影在线观看| 日韩欧美第一区| 亚洲午夜一区二区三区| 99国内精品久久| 成人性生交大片免费看视频在线 | 中文字幕一区日韩精品欧美| 视频一区二区国产| 欧美色成人综合| 亚洲午夜一区二区| 欧美日韩国产综合久久| 日韩理论片网站| 国产制服丝袜一区| 精品美女被调教视频大全网站| 一区二区三区欧美激情| 成人午夜精品在线| 中文字幕av不卡| 成人18视频在线播放| 日本一区二区三区国色天香| 国产白丝精品91爽爽久久| 国产欧美久久久精品影院| 成人午夜又粗又硬又大| 国产精品久久夜| 9i在线看片成人免费| 一区二区三区精品在线| 欧美日韩在线播| 中文字幕中文字幕一区| 91麻豆国产自产在线观看| 国产亚洲欧美色| 国产大陆a不卡| 国产婷婷色一区二区三区在线| 国产一区二区三区免费观看| 中文字幕av一区二区三区高| 成人禁用看黄a在线| 亚洲激情男女视频| 欧美一级理论片| 99久久综合精品| 日韩成人dvd| 国产欧美综合色| 色激情天天射综合网| 亚洲成人av中文| 久久精品日韩一区二区三区| 99热精品国产|