问题描述
我用这种窗口样式创建了窗口:WS_CLIPCHILDREN |WS_POPUP |WS_BORDER |WS_SIZEBOX |WS_VISIBLE.
但由于未知原因 WS_CLIPSIBLINGS 样式会自动添加.
你知道这是什么原因吗?
示例代码:
hWnd = CreateWindowExW(0, szWindowClass, szTitle, WS_CLIPCHILDREN | WS_POPUP | WS_BORDER | WS_SIZEBOX | WS_VISIBLE, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, Instance, NULL, NULL);
添加 WS_CLIPSIBLINGS
重绘后
I created window with this window styles: WS_CLIPCHILDREN | WS_POPUP | WS_BORDER | WS_SIZEBOX | WS_VISIBLE.
But for unknown reason WS_CLIPSIBLINGS style is automatically added.
Do you somebody know reason for this?
Sample code:
hWnd = CreateWindowExW(0, szWindowClass, szTitle, WS_CLIPCHILDREN | WS_POPUP | WS_BORDER | WS_SIZEBOX | WS_VISIBLE, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
Only child windows are mentioned in the MSDN.
Actually, All overlapped and popup-style windows have WS_CLIPSIBLINGS
properties. That is to say, you can't get rid of WS_CLIPSIBLINGS
attributes and draw in its overlapping brothers'windows.
If it's just a child window, you can add WS_CLIPSIBLINGS
yourself.
Add WS_CLIPSIBLINGS
After redrawing
这篇关于WS_CLIPSIBLINGS 样式自动添加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!