开发者

Combobox hidden on resize

开发者 https://www.devze.com 2023-01-15 08:55 出处:网络
Whenever I resize my controls in my window, in response to a WM_SIZE message, they resize and redraw themselves fine. But my combobox control (a dropdown list) disappears whenever I gi开发者_StackOver

Whenever I resize my controls in my window, in response to a WM_SIZE message, they resize and redraw themselves fine. But my combobox control (a dropdown list) disappears whenever I gi开发者_StackOverflow中文版ve it a resize message, until I hover over it to bring it back.

There are two possibilities, either it is not redrawing when I resize it, or it is being hidden by my tab control. So how would I solve this problem?


I think the problem is probably the tab control hiding your control.

You can use SetWindowPos to set its z-order with specifying SWP_NOMOVE and SWP_NOSIZE.

You can also use BringWindowToTop to bring the combobox to the top of your z-order.

0

精彩评论

暂无评论...
验证码 换一张
取 消