开发者

Radio groups in MFC

  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 us开发者_开发百科ing DDX_*.


  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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜