且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 mfc 中将控件置于最前面

更新时间:2023-10-11 11:34:40

我认为前面的控件会是rc文件中最后出现的控件.换句话说,对话框编辑器将在 rc 文件中从上到下绘制每个遇到的控件,并在必要时将它们重叠.

I think the control in front will be the last control that occurs in the rc file. In other words, the dialog editor will draw each control as it is encountered from top to bottom in the rc file, overlapping them when necessary.

您可以编辑 rc 文件以重新排序它们,或者您可以在编辑器中更改 Tab 键顺序,这样做的效果相同,因为 Tab 键顺序也是根据控件在文件中出现的顺序设置的.据我所知,MFC 没有提供任何其他在设计时对重叠控件进行分层的方式.

You can edit the rc file to reorder them, or you can change the tab order in the editor, which does the same thing since tab order is also set based on the order that the controls occur in the file. To my knowledge MFC doesn't offer any other way of layering overlapping controls at design time.