急:如何使WS_CHILD属性的对话框改变为WS_POPUP ?

wdf3 2003-10-10 04:29:40
在对话框资源中为Child的对话框,在程序的一部分用作Child,在另一部分需用作
WS_POPUP,请问怎样用代码将其WS_CHILD属性改为WS_POPUP.

我在
pDlg = new CMyDlg;
pDlg->Create(IDD,pParent);
后再用
pDlg->ModifyStyle(WS_CHILD, WS_POPUP,SWP_FRAMECHANGED|SWP_NOMOVE);
仍不行。
...全文
142 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
wdf3 2003-10-13
  • 打赏
  • 举报
回复
qhd
wdf3 2003-10-11
  • 打赏
  • 举报
回复

以上回答都不行。
Paris_Luo 2003-10-10
  • 打赏
  • 举报
回复
SetWindowsLong()
wuxfBrave 2003-10-10
  • 打赏
  • 举报
回复
最好再去掉标题栏
wuxfBrave 2003-10-10
  • 打赏
  • 举报
回复
pDlg->ModifyStyle(WS_POPUP, WS_CHILD,SWP_FRAMECHANGED|SWP_NOMOVE);
参数含义搞错了,第一个参数是去掉的风格
FlyYang 2003-10-10
  • 打赏
  • 举报
回复
在对话框的PreCreateWindow(CREATESTRUCT& cs)中修改呢

---------
++C++
---------
MFC开发过程序所需的ModifyStyle(needDelStyle,needAddStyle,SWP_FRAMECHANGED); Sytel: 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_CHILDWINDOW Same as the WS_CHILD 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_ICONIC Creates a window that is initially minimized. Same as the WS_MINIMIZE style. 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 a

16,551

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Creator Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧