估计一行语句就够了吧

解决方案 »

  1.   

    参考一下HTMl Application,好像需要文件名为*.hta
      

  2.   

    好象在SetWindowPos中修改风格参数就可以实现
      

  3.   

    Override CMainFrame::PreCreateWindow()
      Change cs.style to WS_POPUP
      

  4.   

    To fingerfox:
    请问cs.style 有好多WS_XXX要设,应该怎么设呀?明白了就马上给分
      

  5.   

    CWnd::PreCreateWindow
    virtual BOOL PreCreateWindow( CREATESTRUCT& cs );Return ValueNonzero if the window creation should continue; 0 to indicate creation failure.ParameterscsA CREATESTRUCT structure.ResCalled by the framework before the creation of the Windows window attached to this CWnd object.Never call this function directly.The default implementation of this function checks for a NULL window class name and substitutes an appropriate default. Override this member function to modify the CREATESTRUCT structure before the window is created. Each class derived from CWnd adds its own functionality to its override of PreCreateWindow. By design, these derivations of PreCreateWindow are not documented. To determine the styles appropriate to each class and the interdependencies between the styles, you can examine the MFC source code for your application’s base class. If you choose to override PreCreateWindow, you can determine whether the styles used in your application’s base class provide the functionality you need by using information gathered from the MFC source code.For more information on changing window styles, see theChanging the Styles of a Window Created by MFC in Visual C++ Programmer’s Guide.
    -------------------------------CREATESTRUCT Structure
    The CREATESTRUCT structure has the following form:typedef struct tagCREATESTRUCT {
       LPVOID    lpCreateParams;
       HANDLE    hInstance;
       HMENU     hMenu;
       HWND      hwndParent;
       int       cy;
       int       cx;
       int       y;
       int       x;
       LONG      style;
       LPCSTR    lpszName;
       LPCSTR    lpszClass;
       DWORD     dwExStyle;
    } CREATESTRUCT;The CREATESTRUCT structure defines the initialization parameters passed to the window procedure of an application. MemberslpCreateParamsPoints to data to be used to create the window.hInstanceIdentifies the module-instance handle of the module that owns the new window.hMenuIdentifies the menu to be used by the new window. If a child window, contains the integer ID.hwndParentIdentifies the window that owns the new window. This member is NULL if the new window is a top-level window.cySpecifies the height of the new window.cxSpecifies the width of the new window.ySpecifies the y-coordinate of the upper-left corner of the new window. Coordinates are relative to the parent window if the new window is a child window; otherwise coordinates are relative to the screen origin.xSpecifies the x-coordinate of the upper-left corner of the new window. Coordinates are relative to the parent window if the new window is a child window; otherwise coordinates are relative to the screen origin.styleSpecifies the new window’s style.lpszNamePoints to a null-terminated string that specifies the new window’s name.lpszClassPoints to a null-terminated string that specifies the new window’s Windows class name (aWNDCLASS structure; for more information, see the Win32 SDK documentation).dwExStyleSpecifies the extended style for the new window.