如何在对话框的界面里添加视图和文档?
问题点数:100、回复次数:7Top
1 楼chen_pin(小品)回复于 2002-01-29 13:32:56 得分 10
关注Top
2 楼cqjiang(蒋天书)回复于 2002-01-29 13:55:40 得分 60
class CWebView : public CHtmlView
{
.......
}
class CDlgWeb : public CDialog
{
// Construction
public:
........
CWebView *m_pWebView;//
........
};
int CDlgWeb::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialog::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
CRect rt;
GetClientRect(rt);
rt.top=24;
m_pWebView= new CWebView;
m_pWebView->Create(NULL,"Hmides帮组",WS_CHILD|WS_VISIBLE|WS_BORDER ,
rt, this, 0,NULL);
CString szPath=g_GetHomeDirectory();
szPath+="Hmiweb\\index.htm";
m_pWebView->Navigate2(szPath);
return 0;
}
添加视关键在于视的Create二次构造函数.
Top
3 楼whz_time(TimesWU)回复于 2002-01-29 14:02:40 得分 0
to cqjiang(蒋天书) :
你的提示对我重要及了Top
4 楼whz_time(TimesWU)回复于 2002-01-29 14:05:08 得分 0
给帖子加点分,随后结帐Top
5 楼pzone(见分眼红)回复于 2002-01-29 14:05:12 得分 30
下面的文章对你有用
http://www.codeguru.com/dialog/ViewOnDlg.htmlTop
6 楼chpin(VCit)回复于 2002-02-01 21:25:33 得分 0
(to) whz_time & cqjiang:
可以发一个例程给我么?非常感谢!!!
chen_pin@163.com
.Top
7 楼chen_pin(小品)回复于 2002-02-05 09:57:15 得分 0
(to) whz_time & cqjiang:
可以发一个例程给我么?非常感谢!!!
chen_pin@163.comTop




