1。PreSubCreate()的调用时机2。SetWindowPos(..)和MoveWindow(..)的差别

解决方案 »

  1.   

    1。应该是做初始化的工作,自动调用的。2。The SetWindowPos function changes the size, position, and Z order of a child, pop-up, or top-level window. Child, pop-up, and top-level windows are ordered according to their appearance on the screen. The topmost window receives the highest rank and is the first window in the Z order.The MoveWindow function changes the position and dimensions of the specified window. For a top-level window, the position and dimensions are relative to the upper-left corner of the screen. For a child window, they are relative to the upper-left corner of the parent window's client area. 
      

  2.   

    1、是PreSubclassWindow还是PreCreateWindow?
    PreSubclassWindow是在CWnd::SubclassWindow以及CWnd::SubclassDlgItem中子类化之前调用的,PreCreateWindow是在CWnd::Create中创建窗口之前调用的,目的是取得窗口的WindowClass。2、基本是一样的,SetWindowPos还可以改变Z-Order等。