首页 > 解决方案 > How to change the border style of a child window?

问题描述

I created a window with three child windows in it and set the child windows style to WS_THICKFRAME, so that the user can change their size. But the new frame coming with it, doesn't suit to it's purpose. So is there an easy way to change the frame's style to only a line? (Such at there is at the WS_BORDER style)

标签: winapi

解决方案


我不认为 WS_THICKFRAME 与子窗口兼容,尽管我在文档中找不到任何具体说明的内容。WS_THICKFRAME 用于顶级窗口和一些弹出窗口。

子窗口上的 WS_BORDER 将(对于大多数类型的子窗口)为您提供单线边框,但这只是一种视觉装饰。它不允许用户调整孩子的大小。

要制作可调整大小的子项,您必须添加自己的逻辑来处理单击和拖动操作。有多种方法可以做到这一点,但所有细节可能超出了 SO 答案的范围。


推荐阅读