winapi - 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)
解决方案
我不认为 WS_THICKFRAME 与子窗口兼容,尽管我在文档中找不到任何具体说明的内容。WS_THICKFRAME 用于顶级窗口和一些弹出窗口。
子窗口上的 WS_BORDER 将(对于大多数类型的子窗口)为您提供单线边框,但这只是一种视觉装饰。它不允许用户调整孩子的大小。
要制作可调整大小的子项,您必须添加自己的逻辑来处理单击和拖动操作。有多种方法可以做到这一点,但所有细节可能超出了 SO 答案的范围。
推荐阅读
- wpf - 无法使用分配了模板的 TextBox.Text 绑定进行管理
- mysql - 尝试在 Percona 上使用 liquibase 会出错
- parallel-processing - OpenMP 和 (Rcpp)Eigen
- php - 网络邻居看不到共享 move_uploaded_file
- javascript - 如何使用 react 将 event.target.value 从一个组件传递到另一个组件
- firebase - Firebase 实时数据库 - 读取多个子对象下的最新项目
- php - MySQL 进程占用 150-400% CPU
- java - 如何使用 try-with 并仍然保留记录器?
- ampl - 如何在 AMPL 中定义一个填充有单个值的数组
- apache-spark - Spark UI 中缺少 Streaming 选项卡