⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wtlclipspy.cpp

📁 WTL for MFC Programmers中第7章的例子
💻 CPP
字号:
// WTLClipSpy.cpp : main source file for WTLClipSpy.exe
//

#include "stdafx.h"
#include "resource.h"
#include "aboutdlg.h"
#include "MainFrm.h"

CAppModule _Module;

CMainFrame* g_pMainWnd = NULL;

int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
    CMessageLoop theLoop;
    _Module.AddMessageLoop(&theLoop);

    CMainFrame wndMain;
    g_pMainWnd = &wndMain;

    if(wndMain.CreateEx() == NULL)
    {
        ATLTRACE(_T("Main window creation failed!\n"));
        return 0;
    }

    wndMain.ShowWindow(nCmdShow);

    int nRet = theLoop.Run();

    _Module.RemoveMessageLoop();
    return nRet;
}

int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow)
{
    // Init COM with OleInitialize() so drag 'n drop will work.
    HRESULT hRes = OleInitialize(NULL);
    ATLASSERT(SUCCEEDED(hRes));

    // Init the common controls, then load the rich edit DLL.
    AtlInitCommonControls ( ICC_WIN95_CLASSES );
    LoadLibrary ( CRichEditCtrl::GetLibraryName() );

    hRes = _Module.Init(NULL, hInstance);
    ATLASSERT(SUCCEEDED(hRes));

    AtlAxWinInit();

    int nRet = Run(lpstrCmdLine, nCmdShow);

    _Module.Term();
    OleUninitialize();

    return nRet;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -