MFC 中的无线电组

发布于 2024-10-09 03:26:32 字数 113 浏览 0 评论 0原文

  1. 如何将多个 mfc 单选框分组为一个组?
  2. 是否可以将变量(最好是指示检查的单选或布尔数组的整数)绑定到此类组。我所说的绑定是指使用DDX_*
  1. How can I group several mfc radio boxes into a single group?
  2. Is it possible to bind a variable (preferably integer indicating the checked radio or boolean array) to such group. By binding I mean using DDX_*.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花间憩 2024-10-16 03:26:32
  1. 单选按钮必须按 Tab 键顺序相邻。 Tab 键顺序可通过 Visual Studio 的对话框编辑器进行编辑(查找“Tab 键顺序”菜单项,Ctrl-D 是 VS 2005 中的快捷方式)。然后您必须按顺序单击单选按钮来排列它们。对于选项卡组中的第一个单选按钮,您必须将其 Group 属性设置为 True。您还应该选择单选按钮组后面的控件,并将其 Group 属性也设置为 True。这样,单选按钮将形成一个组,并按预期运行(检查当某些单选按钮具有焦点时键盘箭头如何工作)。

  2. 通过 DDX_Radio 宏按上述配置后,您可以绑定单选按钮组。请参阅:http://msdn.microsoft.com/ en-US/library/fchz3yh5(v=VS.80).aspx

  1. The radio buttons must be adjacent in Tab order. The tab order is editable from Visual Studio's Dialog Editor (Find a 'Tab Order' menu item, Ctrl-D was the shortcut in VS 2005). Then you have to arrange the radio buttons by clicking them in order. For the first radio button in the tab group you have to set its Group property to True. You should also select the control that follows your group of radio buttons and set its Group property to True too. This way the radio buttons will form a group and will behave as expected (check to see how the keyboard arrows work when some of the radio buttons has the focus).

  2. You can bind the set of radio buttons after configuring them as above via DDX_Radio macro. See: http://msdn.microsoft.com/en-US/library/fchz3yh5(v=VS.80).aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文