如何将列表视图控件保留在其他窗口之上?
我正在开发一个示例,其中包含列表视图以显示数据库中的名称列表。一旦应用程序启动,列表视图将不可见。单击某个按钮后,我将其设置为可见。如果我使其可见,列表视图下面的控件也可见。我在该控件下方有按钮,一旦我将鼠标悬停在列表视图上,该按钮也会显示在列表视图上。
现在请让我如何解决这个问题。
I am working on a sample which contains list view to display list of names in the data base. Once the application is launched list view will be invisible. After clicking on some button I am making it to visible. If I make it to visible the control bellow the list view are also visible. And I have button bellow that control, once I hove on the list view the button also displays over the list view.
Please let me now how to solve this problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来好像对话框中的子窗口彼此重叠。使用 ShowWindow(SW_HIDE) 隐藏“下面”的窗口。因此,当您使列表视图可见时,请隐藏下面的按钮。
在 Windows 桌面上,应用程序窗口将正确隐藏彼此下方的其他窗口,但在对话框中,使用不同的样式,并且您必须小心不要让控件重叠,否则它们可能会在彼此之上绘制。相反,您需要隐藏那些您不想看到的内容。
It sounds like you have child windows on top of each other in a dialog. Use ShowWindow(SW_HIDE) to hide the windows that are 'underneath'. So when you make the listview visible, hide the button that is underneath.
On the windows desktop, application windows will properly hide other windows that are underneath one another, but in a dialog, different styles are used, and you have to be careful not to let controls overlap or they can draw on top of each other. Instead you need to hide the ones that you don't want to be visible.