说白了,就是象Word2003一样,看起来是多个窗口显示,其实只有一个Word进程,并且关闭时只关闭当前的窗口,不会将进程关掉。新建窗口的时候选择WM_EX_APPWINDOW风格不是WM_EX_APPWINDOW,而是WS_EX_APPWINDOW,但是我在ChildFrm.Cpp的PreCreateWindow加了这个风格也不行呀??在View中加了也不行。 BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs cs.style=cs.style | WS_EX_APPWINDOW; if( !CMDIChildWnd::PreCreateWindow(cs) ) return FALSE; return TRUE; }
BOOL CAaaView::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs cs.style=cs.style | WS_EX_APPWINDOW; return CView::PreCreateWindow(cs); } http://topic.csdn.net/t/20050927/08/4296017.html
如果是用D7,请百度: delphi中停靠技术的实现
请见: http://hi.baidu.com/chinamis/blog/item/d1f82733b02fd3f11b4cff69.html
不过我能力有限,现在我还没能实现动态的!
(1)只有一个进程;
(2)可以有多个同样的窗口(View);
(3)窗口都独立在外,不象CMultiDocTemplate每个窗口(View)都在MainFrm框架内,对外看起来好像是多个进程。
说白了,就是象Word2003一样,看起来是多个窗口显示,其实只有一个Word进程,并且关闭时只关闭当前的窗口,不会将进程关掉。新建窗口的时候选择WM_EX_APPWINDOW风格不是WM_EX_APPWINDOW,而是WS_EX_APPWINDOW,但是我在ChildFrm.Cpp的PreCreateWindow加了这个风格也不行呀??在View中加了也不行。
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.style=cs.style | WS_EX_APPWINDOW;
if( !CMDIChildWnd::PreCreateWindow(cs) )
return FALSE;
return TRUE;
}
BOOL CAaaView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.style=cs.style | WS_EX_APPWINDOW;
return CView::PreCreateWindow(cs);
} http://topic.csdn.net/t/20050927/08/4296017.html