BOOL Create( CWnd* pParentWnd = NULL, DWORD dwStyle = (DWORD)–1, DWORD dwExStyle = 0 );pParentWnd是父窗口指针,dwStyle是窗口类型,dwExStyle是扩展窗口类型
dwStyle默认值WS_SYSMENU | WS_POPUP | WS_CAPTION | DS_MODALFRAME | DS_CONTEXT_HELP | WS_VISIBLE
dwExStyle默认值WS_EX_DLGMODALFRAME

解决方案 »

  1.   

    但我使用pParentWnd后创建了一个包含属性页的无模式对话框
    如何使父窗口包含属性页?
      

  2.   

    PROPDLG: Demonstrates Property Sheet Support
    Click to open or copy the PROPDLG project files.PROPDLG illustrates Microsoft Foundation Class Library (MFC) support for property sheets or tabbed dialog boxes. PROPDLG also illustrates a modeless mini-frame window. PROPDLG is a simple object drawing program that uses property sheets for entering the shape and color attributes of a currently selected object. For an example of a more fully featured object drawing program, see the DRAWCLI sample.Click anywhere in the view to add a new shape, which is initially a fixed-size rectangle. Click elsewhere to add more shapes. To select a shape, click that shape. The Object menu offers three types of property sheets for updating the attributes of the currently selected object. A real application would typically only offer one of these types of property sheets: Simple Property Sheet — A pop-up dialog box with tabs for Style and Shape. Click OK to apply the properties to the currently selected object and exit the dialog box. Click Cancel to exit the dialog box without applying the properties. The Apply Now and Help buttons are always disabled in these illustrations.
    Property Sheet with Preview — Also a pop-up dialog box with two tabs. This dialog box also has a preview child window. The preview window shows you what the object would look like if the current values in the property sheet were applied. This illustrates how you can customize the layout of a property sheet. This example also implements the Apply Now button, which is enabled whenever you change any property.
    Mini-Frame Property Sheet — A modeless property sheet dialog box within a mini-frame window. The properties in this modeless dialog box always reflect the currently selected object. Changes to values in the property sheet are applied immediately to the currently selected object.