更改 Win32 窗口样式 [英] Change Win32 Window Style

查看:48
本文介绍了更改 Win32 窗口样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个 win32 函数可以在创建窗口后更改窗口的样式?我想更改在 CreateWindowEx 中指定的样式标志.具体来说,我想将标准窗口转换为没有边框且不调整大小的窗口.

Is there a win32 function to change the style of a window after it has been created? I would like to change the style flags that are specified in CreateWindowEx. Specifically, I would like to convert a standard window to a window with no border and no resize.

推荐答案

我认为 SetWindowLongPtr 应该这样做.请注意,如备注中所指出的,如果您更改了边框样式,则需要在之后调用 SetWindowPos.

某些样式仅在窗口创建期间生效,因此无法通过此调用进行设置.MSDN 通常会调出可以在之后设置的样式.

Some styles only take effect during window creation and so can not be set by this call. MSDN normally calls out styles that CAN be set afterwards.

这篇关于更改 Win32 窗口样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆