myfirstatlwindow.cpp

来自「基本于C++的WTL界面设计,带源代码及Demo程序」· C++ 代码 · 共 34 行

CPP
34
字号
// MyFirstATLWindow.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "MyWindow.h"

CComModule _Module;

int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hInstPrev,
                   LPSTR szCmdLine, int nCmdShow)
{
    _Module.Init(NULL, hInst);
 
CMyWindow wndMain;
MSG msg;
 
    // Create our main window
    if ( NULL == wndMain.Create ( NULL, CWindow::rcDefault, _T("My First ATL Window") ))
        return 1;   // window creation failed

    wndMain.ShowWindow(nCmdShow);
    wndMain.UpdateWindow();

    // Your standard Win32 message loop:
    while ( GetMessage ( &msg, NULL, 0, 0 ) > 0 )
        {
        TranslateMessage ( &msg );
        DispatchMessage ( &msg );
        }
 
    _Module.Term();
    return msg.wParam;
}

⌨️ 快捷键说明

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