CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
花落谁家,你作主! 盛大widget设计大赛英雄榜
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VC/MFC >  界面

一个子窗口的问题??

楼主hdsw21st(云淡风清)2003-10-03 09:38:17 在 VC/MFC / 界面 提问

我想创建一个(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

相关问题

  • 子窗口问题
  • 关闭子窗口
  • 子窗口问题
  • 枚举子窗口
  • 子窗口问题
  • 子窗口取得父窗口的值?
  • 子窗口跑到主窗口背后??
  • 能否从父窗口通过子窗口的窗口名控制子窗口?
  • 子数据窗口问题
  • MDI子窗口的问题

关键词

  • ws
  • child
  • overlapped
  • 窗体
  • popupwindow
  • clipsiblings
  • minimizebox
  • maximizebox
  • sysmenu
  • dialog

得分解答快速导航

  • 帖主:hdsw21st
  • Skt32
  • Skt32
  • vcforever
  • Paris_Luo

相关链接

  • Visual C++类图书
  • Visual C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo