关于主窗口与子窗口的问题

guanshangming 2003-08-21 12:31:45
我的程序主窗口调用若干个子窗口,采用非模态方式,但我希望它不会被主窗口覆盖,但又不能StayOnTop,因为不希望要关闭此窗口才能看到其它程序的窗口。(我的程序不是MDI窗口的程序)
...全文
67 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
guanshangming 2003-08-22
  • 打赏
  • 举报
回复
叶飞的方法不错,但在多窗体时仍然难以控制,最后,我还是做成了MDI窗口,只是想不到,MDI窗口是如此容易实现,只是设置一下FormStyle的属性则可,多谢各位的意见和参考!
oldcold 2003-08-21
  • 打赏
  • 举报
回复
你设置你打开的窗口都是stayOntop就行了
wuxking 2003-08-21
  • 打赏
  • 举报
回复
运行时把主窗口最小化啊。
lvjack 2003-08-21
  • 打赏
  • 举报
回复
用BOOL SetWindowPos(

HWND hWnd, // handle of window
HWND hWndInsertAfter, // placement-order handle
int X, // horizontal position
int Y, // vertical position
int cx, // width
int cy, // height
UINT uFlags // window-positioning flags
);

设置为HWND_TOP Places the window at the top of the Z order.
试试

注意不是HWND_TOPMOST Places the window above all non-topmost windows. The window maintains its topmost position even when it is deactivated.
极速小王子 2003-08-21
  • 打赏
  • 举报
回复
不知道,学习ing

604

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder VCL组件使用和开发
社区管理员
  • VCL组件使用和开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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