通过MFC对话框中的代码更改制表符顺序 [英] Change Tab order by code in a MFC Dialog

查看:171
本文介绍了通过MFC对话框中的代码更改制表符顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在OnInitDialog中通过代码创建了一个控件,但是我找不到任何方法来通过代码更改对话框的选项卡顺序.

I created a control by code in the OnInitDialog, but i cannot find any way to change the tab order of the dialog by code.

有人对如何执行此操作有任何想法吗?

Anyone have any idea on how to do this?

推荐答案

对话框上控件的选项卡顺序由这些控件的Z顺序控制.因此,要更改选项卡顺序,请更改相关控件的z顺序位置.

The tab order of controls on a dialog is governed by the Z-Order of those controls. So, to change the tab order, change the z-order positioning of the relevant controls.

您可以通过使用 SetWindowPos来更改z顺序.例如,请参见.

You can change the z-order by using SetWindowPos. See this, for example.

这篇关于通过MFC对话框中的代码更改制表符顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆