CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Parsing error

  1. #1
    Join Date
    Aug 2001
    Posts
    52

    Parsing error

    I am getting the following error when I open the class wizard:

    Parsing error: Expected "=".
    Input Line: "SetReadOnly(bReadOnly);"

    I have deleted and rebuilt my clw file numerous times but still get this error on one of my files. Don't know what is up, but man is it annoying. Along with this error, I am getting a error on Button1.EnableWindow(); function call. All my other calls in my other dialogs work. Not sure what is happening, but annoying. Could some one please help. If you can help me, I'll give you a 3 vote (twice, if permitted).

    Please vote for this if it helped you. Thanks

    If it wasn't for time...we would never be late.
    - Keener Hachey

  2. #2
    Join Date
    Feb 2000
    Location
    Greensboro NC
    Posts
    123

    Re: Parsing error

    the setreadonly line needs to outside of the class wizard delimiters


  3. #3
    Join Date
    Aug 2009
    Posts
    2

    Re: Parsing error

    I am also facing the same issue.
    I have following error
    Parsing error: Expected ")".
    Input Line:"DDX_Control(pDX, IDC_DssButt64, m_DssButt[64]);"

    I have removed the clw and ncb file and rebuild the code still facing the same error

    I have manually added the code to dialog dodataexchange as follow:


    void CDssPage1:oDataExchange(CDataExchange* pDX)
    {
    CDssPage:oDataExchange(pDX);
    //{{AFX_DATA_MAP(CDssPage1)
    DDX_Control(pDX, IDC_DssButt64, m_DssButt[64]);
    DDX_Control(pDX, IDC_DssButt65, m_DssButt[65]);
    DDX_Control(pDX, IDC_DssButt66, m_DssButt[66]);
    DDX_Control(pDX, IDC_DssButt67, m_DssButt[67]);
    DDX_Control(pDX, IDC_DssButt68, m_DssButt[68]);
    DDX_Control(pDX, IDC_DssButt69, m_DssButt[69]);
    DDX_Control(pDX, IDC_DssButt70, m_DssButt[70]);
    DDX_Control(pDX, IDC_DssButt71, m_DssButt[71]);
    // NOTE: the ClassWizard will add DDX and DDV calls here
    //}}AFX_DATA_MAP
    }

  4. #4
    Join Date
    Feb 2002
    Posts
    4,640

    Re: Parsing error

    I haven't worked with MFC in a while, but my guess is that the parser isn't expecting to see array notation in the DDX_* function calls.

    If you really want to use arrays, then move those lines of code outside the AFX_DATA_MAP comments:
    Code:
    void CDssPage1::DoDataExchange(CDataExchange* pDX)
    {
    CDssPage:oDataExchange(pDX);
    //{{AFX_DATA_MAP(CDssPage1)
    // NOTE: the ClassWizard will add DDX and DDV calls here
    //}}AFX_DATA_MAP
    DDX_Control(pDX, IDC_DssButt64, m_DssButt[64]);
    DDX_Control(pDX, IDC_DssButt65, m_DssButt[65]);
    DDX_Control(pDX, IDC_DssButt66, m_DssButt[66]);
    DDX_Control(pDX, IDC_DssButt67, m_DssButt[67]);
    DDX_Control(pDX, IDC_DssButt68, m_DssButt[68]);
    DDX_Control(pDX, IDC_DssButt69, m_DssButt[69]);
    DDX_Control(pDX, IDC_DssButt70, m_DssButt[70]);
    DDX_Control(pDX, IDC_DssButt71, m_DssButt[71]);
    }
    Viggy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured