zoukankan      html  css  js  c++  java
  • 消除VC 中的skipping nonradio button in group错误

    假定有两组Radio-button, 第一组有两个button Tab-Order分别为 6 和 7 (6号的Group 属性打勾)。另一组的两个button Tab-Order分别为  10和 11(10号的Group 属性打勾)。  Tab-Order号为12的控件是一个EditBox, 将此EditBox的Group属性打勾。就可消除skipping non-radio button in group错误。


    Does anybody know what this warning message means? "Warning: skipping
    >non-radio button in group" and how can I correct the problem?

    MFC assumes that a group of radio buttons are in consecutive tab order. In
    certain circumstances you might not want this, for instance if an edit field
    next to a radio button gives extra info about just that one choice. If you are
    happy with how your group of radio buttons responds to the tab key, then this
    is not really a problem.

    ===== Digest Separator =====

    Mesg: 0F7BD4AE
    From: BOGDAN LEDWIG <[log in to unmask]>
    Subj: Re: Warning: skipping non-radio button in group.
    Date: Fri, 1 Jan 1999 13:36:57 +0100

    Probably you have incorrectly assigned tab orders in your dialog. Check out
    the "Layout/Tab Order" command in VC dialog editor.

    ===== Digest Separator =====

    Mesg: E743A87A
    From: Dennis Werry <[log in to unmask]>
    Subj: Re: Warning: skipping non-radio button in group.
    Date: Fri, 01 Jan 1999 08:59:00 -0600

    A Radio button  group is created by setting the first radio button in the
    group with the "group" attribute.  Then the group is supposed to consist of
    all subsequent items in the tab order until the next item that has the group
    attribute set. Evidently, you have not set the group attribute for the control
    immediately following the last radio button in the tab order.

    ===== Digest Separator =====

    Mesg: C229AD39
    From: Paul Gerhart <[log in to unmask]>
    Subj: Re: Warning: skipping non-radio button in group.
    Date: Fri, 01 Jan 1999 10:44:58 -0500

    Use the editor to look at the Tab Order of the controls. Make sure the first
    radio has the Group setting and go in order until the next thing that has
    Group (lot of folks use a group box around the related radio buttons and set
    it to Group and give it tab order after the last radio in the grouping). Make
    sure all the controls between the two Group marks are all radios (and not some
    other kind of control).

    ===== Digest Separator =====

    Mesg: AC6F0B66
    From: Seethaprasad Mandikel <[log in to unmask]>
    Subj: RE: Warning: skipping non-radio button in group.
    Date: Fri, 1 Jan 1999 13:48:23 +0530

    This warning comes becos of WS_GROUP style not set  properly for Dialogs which
    has radio buttons and other buttons in a SAME GROUP. Solution: Just set the
    WS_GROUP style for all controls other than Radio buttons(Which you want to
    group). Here is snippet of code which causes this warning.

    File :  ...\VC\mfc\src\DLGDATA.CPP

    void AFXAPI DDX_Radio(CDataExchange* pDX, int nIDC, int& value)
        // must be first in a group of auto radio buttons
    {

        // walk all children in GROUP  to check the states
        int iButton = 0;
        do
        {

            //Check whether the button in the group box is radio button
    if not it gives the warning
            if (::SendMessage(hWndCtrl, WM_GETDLGCODE, 0, 0L) &
    DLGC_RADIOBUTTON)
            {
                // control in group is a radio button
                ........................
                Check the state of the radio button
            }
            else
            {
                TRACE0("Warning: skipping non-radio button in group.\n");
            }
            hWndCtrl = ::GetWindow(hWndCtrl, GW_HWNDNEXT);

        } while (hWndCtrl != NULL &&
            !(GetWindowLong(hWndCtrl, GWL_STYLE) & WS_GROUP));
    }

    ===== Digest Separator =====

    Mesg: A7024836
    From: CHRIS DEPETRIS <[log in to unmask]>
    Subj: Re: Warning: skipping non-radio button in group.
    Date: Fri, 1 Jan 1999 09:21:42 -0500

    The problem is that the next control in the tab order following the last radio
    button of your group must have the WS_GROUP flag set.

    ex:
    Control        Group Flag On
    Static Text          Yes
    Radio Button1        Yes
    Radio Button2        No
    Radio Button3        No
    Button               Yes

    In the previous list, if the last button did not have the group flag set you
    would get the TRACE warning while running.

    ===== Digest Separator =====

    Mesg: 8B613945
    From: LEROY BAXTER <[log in to unmask]>
    Subj: RE: Warning: skipping non-radio button in group.
    Date: Thu, 31 Dec 1998 23:13:44 -0800

    In the Resource Editor, you need to set the tab order for the Radio buttons -
    they must be sequential.  The first button must have the Group property set,
    and the first item following the last button must also have the Group property
    set

  • 相关阅读:
    【转】Unity学习笔记——MonoBehaviour类Invoke, Coroutine
    【转】Unity3D协同程序(Coroutine)
    Java定时任务
    SMSLib开发指南
    短信猫JAVA二次开发包SMSLib,org.smslib.TimeoutException: No response from device解决方案
    注解+反射+JDBC,实现一个简易的泛型DAO接口
    利用Window超级终端,修改短信猫波特率
    深入理解JDK动态代理机制
    深入分析Java ClassLoader原理
    Linux内核升级指南
  • 原文地址:https://www.cnblogs.com/cy163/p/518664.html
Copyright © 2011-2022 走看看