zoukankan      html  css  js  c++  java
  • programming+windows+MFC

    1)CMyApp declares no data members

    2)CWinApp::InitInstance run after application build but before the window is create

     2.1 InitInstance is the perfect place to perform initializations that need to be done each time the program starts(Just like VB's formload?)

      2.2m_pMainWnd = new CMainWindow; (in InitInstance ):constructs a CMainWindow object and copies its address to the application object's m_pMainWnd data member

    2.3 a window is not initially visible unless it is created with a WS_VISIBLE
    attribute—by calling ShowWindow and UpdateWindow through the CMainWindow pointer:

    (ShowWindow and UpdateWindow are CWnd member functions common to all window objects)

    2.4can use ExitInstance to clean up when an application terminates

    3)onldle un exitinstancepretranslatemessage

    4)Right after starting, AfxWinMain calls a function named AfxWinInit to initialize the framework and copy hInstance, nCmdShow,and other AfxWinMain function parameters to data members of the application object.

    Then it calls InitApplication andInitInstance 

    5)An MFC application creates a window by creating a window object and calling its Create or CreateEx function. Hello creates a CMainWindow object in CMyApp::InitInstance. CMainWindow's constructor creates the window you see on the screen:

  • 相关阅读:
    岁月静好
    一代才女林徽因 人生若只如初见
    HTML5手机网站开发页面宽度解决方案
    上帝是公平的
    我一直在坚持,你呢?
    让生命更美丽!
    网页跳转,可以任意规定延迟显示的时间
    !important的用法
    小站初建
    GTD之图表
  • 原文地址:https://www.cnblogs.com/gosteps/p/3317732.html
Copyright © 2011-2022 走看看