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:

  • 相关阅读:
    括号匹配(有点复杂,因为它讲得详细)
    A+B/A*B求A和B
    构造哈夫曼树
    用栈实现进制转换
    实现二叉树各种基本运算的算法
    十六进制加法
    求二叉树中叶子结点到根结点的路径
    SilverLight4常见问题及解决办法
    Silverlight中自定义控件
    Silverlight发布时的优化工作
  • 原文地址:https://www.cnblogs.com/gosteps/p/3317732.html
Copyright © 2011-2022 走看看