一个子窗口的问题??
我想创建一个(cview、CDoc、CMframe)的子窗体,其实就是弄一个Dialog在一个窗体里面。
用这样的方法就行了,m_Dialog.Create(IDC_DIALOG,this),而且要修改属性使其为
style是child。
但是形成的只是一个对话框,不能形成一个有最大化、最小化的子窗体。
问题点数:50、回复次数:5Top
1 楼Skt32(荒城之月)回复于 2003-10-03 10:47:46 得分 20
IDC_DIALOG
Use the WS_VISIBLE style in the dialog-box template if the dialog box should appear when the parent window is created. Otherwise, you must call ShowWindow. For further dialog-box styles and their application, see theDLGTEMPLATE structure in the Win32 SDK documentation and Window Styles in the Class Library Reference
Window Styles
WS_BORDER Creates a window that has a border.
WS_CAPTION Creates a window that has a title bar (implies the WS_BORDER style). Cannot be used with the WS_DLGFRAME style.
WS_CHILD Creates a child window. Cannot be used with the WS_POPUP style.
WS_CLIPCHILDREN Excludes the area occupied by child windows when you draw within the parent window. Used when you create the parent window.
WS_CLIPSIBLINGS Clips child windows relative to each other; that is, when a particular child window receives a paint message, the WS_CLIPSIBLINGS style clips all other overlapped child windows out of the region of the child window to be updated. (If WS_CLIPSIBLINGS is not given and child windows overlap, when you draw within the client area of a child window, it is possible to draw within the client area of a neighboring child window.) For use with the WS_CHILD style only.
WS_DISABLED Creates a window that is initially disabled.
WS_DLGFRAME Creates a window with a double border but no title.
WS_GROUP Specifies the first control of a group of controls in which the user can move from one control to the next with the arrow keys. All controls defined with the WS_GROUP style FALSE after the first control belong to the same group. The next control with the WS_GROUP style starts the next group (that is, one group ends where the next begins).
WS_HSCROLL Creates a window that has a horizontal scroll bar.
WS_MAXIMIZE Creates a window of maximum size.
WS_MAXIMIZEBOX Creates a window that has a Maximize button.
WS_MINIMIZE Creates a window that is initially minimized. For use with the WS_OVERLAPPED style only.
WS_MINIMIZEBOX Creates a window that has a Minimize button.
WS_OVERLAPPED Creates an overlapped window. An overlapped window usually has a caption and a border.
WS_OVERLAPPEDWINDOW Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles.
WS_POPUP Creates a pop-up window. Cannot be used with the WS_CHILD style.
WS_POPUPWINDOW Creates a pop-up window with the WS_BORDER, WS_POPUP, and WS_SYSMENU styles. The WS_CAPTION style must be combined with the WS_POPUPWINDOW style to make the Control menu visible.
WS_SYSMENU Creates a window that has a Control-menu box in its title bar. Used only for windows with title bars.
WS_TABSTOP Specifies one of any number of controls through which the user can move by using the TAB key. The TAB key moves the user to the next control specified by the WS_TABSTOP style.
WS_THICKFRAME Creates a window with a thick frame that can be used to size the window.
WS_VISIBLE Creates a window that is initially visible.
WS_VSCROLL Creates a window that has a vertical scroll bar.
See Also CWnd::Create, CWnd::CreateEx
Top
2 楼Skt32(荒城之月)回复于 2003-10-03 10:48:36 得分 10
WS_MINIMIZEBOX
WS_MAXIMIZEBOXTop
3 楼vcforever(累)回复于 2003-10-03 11:26:25 得分 10
哇!楼上的说了这么多,俺再补充一点,
楼主可以用CFormView来实现吗!
CFormView和对话框的处理差不多,也很容易!
呵呵……希望对你有所帮助!Top
4 楼Paris_Luo(不懂)回复于 2003-10-03 11:49:26 得分 10
子窗口应该是不能具有最大最小化功能的
除非设计为POPUPWINDOW之类Top
5 楼hdsw21st(云淡风清)回复于 2003-10-03 17:28:36 得分 0
搞定了,谢谢大家!!!!!Top




