且构网

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

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

更新时间:2023-10-11 11:35:10

我认为前面的控件将是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文件以对它们重新排序,也可以在编辑器中更改选项卡顺序,这也是一样,因为选项卡顺序也是根据控件在文件中的出现顺序设置的.据我所知,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.