社区
界面
帖子详情
怎样创建并显示一个窗口(Cformview 或Cview或CEditView 其派生的窗口)
haiyangfeng
2002-10-25 11:34:58
我创建一个CFormView 单文档项目,现在想在一个按钮点击事件中创建并显示一个由
Cformview 或Cview或CEditView 其派生的窗口,应该怎样做??
主要是窗口的创建并显示问题!?
请高手指点!
谢谢。
...全文
207
9
打赏
收藏
怎样创建并显示一个窗口(Cformview 或Cview或CEditView 其派生的窗口)
我创建一个CFormView 单文档项目,现在想在一个按钮点击事件中创建并显示一个由 Cformview 或Cview或CEditView 其派生的窗口,应该怎样做?? 主要是窗口的创建并显示问题!? 请高手指点! 谢谢。
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
9 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
haiyangfeng
2002-11-06
打赏
举报
回复
没有能说明得更详细一点的么???!!
ruihuahan
2002-10-30
打赏
举报
回复
如果新的View属于同一个文档,可以在创建这个View后用CDocument::AddView()加入。
lysde
2002-10-29
打赏
举报
回复
太难了
xiaowencsdn
2002-10-28
打赏
举报
回复
我也有同样的问题,只是我还用了拆分窗口。望高手们指教.
haiyangfeng
2002-10-28
打赏
举报
回复
有没有更详细的。我可是很菜的。谢谢
psandy2003
2002-10-26
打赏
举报
回复
首先,通过点击按钮,建立一个窗体。
OnLBtnDown()
{
//Create a new window in which the view is displayed
}
然后,在新窗体里显示你的View
CRuntimeClass *pClass = RUNTIME_CLASS(CMyView);
CWnd *pWnd = pClass->CreateObject();
pWnd->Create(); // 指定你的新窗口作为Parent wnd
CMyView *pView = (CMyView *) pWnd;
pView->ShowWindow(SW_SHOW);
seaboard
2002-10-25
打赏
举报
回复
菜鸟关注...
ColderRain
2002-10-25
打赏
举报
回复
如果是动态创建CVIEW的派生类,就得加文档摸版
ColderRain
2002-10-25
打赏
举报
回复
CWnd* pWnd = new CWnd;
pWnd->Create(_T("STATIC"),
"Hi",
WS_CHILD | WS_VISIBLE,
CRect(0, 0, 20, 20),
this, 1234);
pWnd->SetWindowPos(&pWnd->wndTop,
100,
100,
100,
100,
SW_SHOWNORMAL)
.........
delete pWnd;
Form
View
中
显示
C
Edit
View
代码演示了怎么在C
Form
View
中增加C
Edit
View
基于MFC的
窗口
分割的设计与实现.pdf
文章介绍了文档视图结构的
窗口
分割技术, 并通过实例, 提供相关的主要代码, 手工实现基于MFC 的单文档多视图的
窗口
分割, 以及多视图之间的通信。用户可以根据需求应用这种方法实现
窗口
各式各样的分割, 可扩展性好。
基于MFC的
窗口
分割的设计与实现.doc
文章介绍了文档视图结构的
窗口
分割技术,并通过实例,提供相关的主要代码,手工实现基于MFC的单文档多视图的
窗口
分割,以及多视图之间的通信。用户可以根据需求应用这种方法实现
窗口
各式各样的分割,可扩展性好。
MFC类库详解中文版(chm)
MFC类目录及头文件 类 描述 头文件 CAnimateCtrl 自动化通用控件 afxcmn.h CArchive afx.h CArchiveException afx.h CArray afxtempl.h CAsyncMonikerFile 在ActiveX控件中提供对异步标记的支持 afxole.h CAsyncScoket 封装Windows Sockets API,参看CSocket afxsock.h CBitmap afxwin.h CBitmapButton afxext.h CBrush afxwin.h CButton 按钮控件对象 afxwin.h CByteArray afxcoll.h CCachedDataPathProperty 允许
一个
ActiveX控件异步传输属性数据和缓冲内存中的数据,参考CDataPathProperty afxctl.h CCheckListBox afxwin.h CClientDC afxwin.h CCmdTarget 所有能够接收和响应消息的对象的基类 afxwin.h CCmdUI afxwin.h CColorDialog 颜色选择的通用对话框,提供为
显示
系统定义的颜色列表 afxdlgs.h CComboBox 组合框对象 afxwin.h CComboBoxEx CComboBox类的
派生
类,用于支持在组合框控件中的图像列表 afxcmn.h CCommandLineInfo afxwin.h CCommonDialog afxdlgs.h CConnectionPoint afxdisp.h CControlBar afxext.h CCreateContext afxext.h CCriticalSection afxmt.h CCtrl
View
afxwin.h CDaoDatabase afxdao.h CDaoException afxdao.h CDaoFieldExchange afxdao.h CDaoQueryDef afxdao.h CDaoRecordset 代表选自数据源的记录集。CDaoRecordset对象可用于三种格式:表类型记录集,动态集类型记录集和快照类型记录集 afxdao.h CDaoRecord
View
提供表单视图,以在控件中
显示
数据库记录。表单视图是CDaoRecordset对象的一部分。参考C
Form
View
和CRecord
View
afxdao.h CDaoTableDef afxdao.h CDaoWorkspace afxdao.h CDatabase afxdb.h CDataExchange afxwin.h CDataPathProperty 实现
一个
ActiveX控件属性,它能够异步加载其数据。这个类允许ActiveX控件在后台下载属性数据时被激活 afxctl.h CDateTimeCtrl 封装新的日期/时间选取器控件 afxdtctl.h CDBException afxdb.h CDBVariant afxdb.h CDC afxwin.h CDialog 用于包含控件
窗口
的对话框对象 afxwin.h CDialogBar afxext.h CDocItem afxole.h CDockState afxadv.h CDocObjectServer afxdocob.h CDocObjectServerItem afxdocob.h CDocTemplate afxwin.h CDocument 用于管理程序的数据的类 afxwin.h CDragListBox Windows列表框,允许用户把其中的项拖放到不同的位置 afxcmn.h CDumpContext afx.h CDWordArray afxcoll.h C
Edit
用于文本输入的子
窗口
控件 afxwin.h C
Edit
View
提供Windows编缉控件的功能。因为C
Edit
View
派生
于C
edit
,该对象可同文件和文件模板一同使用 afxext.h CEvent afxmt.h CException afx.h CFieldExchange afxdb.h CFile afx.h CFileDialog 通用文件对话框,提供Open和Save As对话框中的功能 afxdlgs.h CFileException afx.h CFileFind afx.h CFindReplaceDialog afxdlgs.h CFont afxwin.h CFontDialog 通用字体对话框,用于
显示
当前已装入系统的字体列表 afxdlgs.h CFontHolder afxctl.h C
Form
View
包含对话框控件的
窗口
afxext.h CFrameWnd SDI(单
窗口
界面)框架
窗口
afxwin.h CFtpConnection afxinet.h CFtpFileFind afxinet.h CGdiObject afxwin.h CGopherConnection afxinet.h CGopherFile afxinet.h CGopherFileFind afxinet.h CGopherLocator afxinet.h CHeaderCtrl 标题通用控件 afxcmn.h CHotKeyCtrl 热键通用控件 afxcmn.h CHtmlStream afxisapi.h CHtml
View
实现Web Browser控件的视图类,能够访问当地或Web上的HTML文件。 afxhtml.h CHttpConnection afxinet.h CHttpFile afxinet.h CHttpFilter
创建
并处理超文传输协议过滤器对象,该对象用于过滤用于HTTP请求的服务器通知 afxisapi.h CHttpFilterContext afxisapi.h CHttpServer Internet Server API(ISAPI)的包装类 afxisapi.h CHttpServerContext afxisapi.h CImageList afxcmn.h CInternetConnection afxinet.h CInternetException afxinet.h CInternetFile afxinet.h CInternetSession afxinet.h CIPAddressCtrl IP地址控件。类似于编缉框,该控件接收Internet 协议格式的地址 afxcmn.h CList afxtempl.h CListBox 列表框对象 afxwin.h CListCtrl 列表视通用控件 afxcmn.h Clist
View
简化CListCtrl的使用,添加了对文件和视图的支持 afxc
view
.h CLongBinary afxdb_.h CMap afxtempl.h CMapPtrToPtr afxcoll.h CMapPtrToWord afxcoll.h CMapStringToOb afxcoll.h CMapStringToPtr afxcoll.h CMapStringToString afxcoll.h CMapWordToOb afxcoll.h CMapWordToPtr afxcoll.h CMDIChildWnd MDI(多文档界面)子框架
窗口
afxwin.h CMDIFrameWnd afxwin.h CMemFile afx.h CMemoryException afx.h CMemoryState CMenu afxwin.h CMetaFileDC afxext.h CMiniFrameWnd 半高的框架
窗口
,主要用于浮动工具栏。
一个
小框架
窗口
没有最小化和最大化按钮,但其他都类似于正常的框架
窗口
afxwin.h CMonikerFile afxole.h CMonthCalCtrl 月历控件,用于
显示
一个
用户可选择日期的日历 afxdtctl.h CMultiDocTemplate afxwin.h CMultiLock afxmt.h CMutex afxmt.h CNotSupportedException afx.h CObArray afxcoll.h CObject afx.h CObList afxcoll.h COleBusyDialog afxodlgs.h COleChangeIconDialog afxodlgs.h COleChangeSourceDialog afxodlgs.h COleClientItem afxole.h COleCmdUI afxdocob.h COleControl afxctl.h COleControlModule afxctl.h COleConvertDialog afxodlgs.h COleCurrency afxdisp.h COleDataObject afxole.h COleDataSource afxole.h COleDateTime afxdisp.h COleDateTimeSpan afxdisp.h COleDBRecord
View
afxoledb.h COleDialog afxodlgs.h COleDispatchDriver afxdisp.h COleDispatchException afxdisp.h COleDocObjectItem afxole.h COleDocument 把
一个
文件看作为CDocItem对象的
一个
集合。包容器和服务器都需要这个结构,因为它们的文件必须能够包含OLE项 afxole.h COleDropSource afxole.h COleDropTarget afxole.h COleException afxdisp.h COleInsertDialog afxodlgs.h COleIPFrameWnd afxole.h COleLinkingDoc OLE包容器文件的基类,这些文件支持对它们所包含项的链接 afxole.h COleLinksDialog afxodlgs.h COleMessageFilter afxole.h COleObjectFactory afxdisp.h COlePasteSpecialDialog afxodlgs.h COlePropertiesDialog afxodlgs.h COlePropertyPage afxctl.h COleResizeBar afxole.h COleSafeArray afxdisp.h COleServerDoc OLE服务器文件的基类 afxole.h COleServerItem 为OLE项提供
一个
服务器界面 afxole.h COleStreamFile afxole.h COleTemplateServer afxdisp.h COleUpdateDialog afxodlgs.h COleVariant afxdisp.h CPageSetupDialog afxdlgs.h CPaintDC afxwin.h CPalette afxwin.h CPen afxwin.h CPictureHolder afxctl.h CPoint atltypes.h CPrintDialog 通用打印对话框,提供Print和Print Setup对话框中的功能 afxdlgs.h CPrintInfo CProgressCtrl 通用进程指示器控件 afxcmn.h CPropertyPage 代表属性表单中的一页 afxdlgs.h CPropertyPageEx CPropertySheet 属性表,也叫做多选项卡对话框。
一个
属性表由
一个
CPropertySheet对象和几个CPropertyPage对象组成 afxdlgs.h CPropertySheetEx CPropExchange afxctl.h CPtrArray afxcoll.h CPtrList afxcoll.h CReBar afxext.h CReBarCtrl afxcmn.h CRecentFileList afxadv.h CRecordset 用于访问数据库表或查询的类 afxdb.h CRecord
View
包含对话框控件的
窗口
afxdb.h CRect atltypes.h CRectTracker afxext.h CResourceException afxwin.h CRgn afxwin.h CRich
Edit
CntrItem afxrich.h CRich
Edit
Ctrl 用户能够输入和编缉文本的
窗口
,提供字符和程序段格式,以及对嵌入OLE项的支持 afxcmn.h CRich
Edit
Doc afxrich.h CRich
Edit
View
afxrich.h CRuntimeClass CScrollBar 滚动条对象 afxwin.h CScroll
View
可滚动的
窗口
,
派生
于C
View
afxwin.h CSemaphore afxmt.h CSharedFile afxadv.h CSingleDocTemplate afxwin.h CSingleLock afxmt.h CSize atltypes.h CSliderCtrl 提供包含
一个
滑块和可选的刻度线的
窗口
afxcmn.h CSocket Windows Socket API的包装类 afxsock.h CSocketFile afxsock.h CSpinButtonCtrl 提供箭头按钮,用户可单击它,以增加或减少某个控件中的
一个
值 afxcmn.h CSplitterWnd afxext.h CStatic 用于标识另
一个
控件或给用户提供消息的简单文本框 afxwin.h CStatusBar afxext.h CStatusBarCtrl 提供
一个
层次
窗口
,通常放于父
窗口
的底部,用于
显示
关于应用程序的状态信息 afxcmn.h CStdioFile afx.h CString afx.h CStringArray afxcoll.h CStringList afxcoll.h CSyncObject afxmt.h CTabCtrl 允许应用程序在
一个
窗口
或对话框的同一区域
显示
多个页面 afxcmn.h CTime afx.h CTimeSpan afx.h CToolBar afxext.h CToolBarCtrl 工具栏通用控件 afxcmn.h CToolTipCtrl 提供工具提示控件的功能,它以
一个
小弹出
窗口
的样子
显示
,包含描述某个工具用途的一行文本 afxcmn.h CTreeCtrl
显示
项的分层结构列表 afxcmn.h CTree
View
简化CTreeCtrl的用法 afxc
view
.h CTypedPtrArray afxtempl.h CTypedPtrList afxtempl.h CTypedPtrMap afxtempl.h CUIntArray afxcoll.h CUserException afxwin.h C
View
用于
显示
程序数据的类 afxwin.h CWaitCursor afxwin.h CWinApp afxwin.h CWindowDC afxwin.h CWinThread 代表
一个
应用程序中的
一个
线程 afxwin.h CWnd afxwin.h CWordArray afxcoll.h ......
精通MFC程序设计04
很好的学习MFC的书籍,欢迎下载 强烈推荐初学者阅读,如有需要,本人邮箱sword2ya@139.com
界面
15,980
社区成员
115,867
社区内容
发帖
与我相关
我的任务
界面
VC/MFC 界面
复制链接
扫一扫
分享
社区描述
VC/MFC 界面
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章