Migrating from VS 6.0 to VS 2008 gives error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • VikrantS
    New Member
    • Nov 2009
    • 2

    Migrating from VS 6.0 to VS 2008 gives error

    Hi,
    I am migrating code from VS 6.0 to VS2008. The Code compiles in VS 6.0 but gives the following errors when compiled in VS 2008,
    ---
    \Program Files\VC\atlmfc \include\afxcmn .inl(376) : error C2065: 'TVM_GETLINECOL OR' : undeclared identifier
    E:\Program Files\VC\atlmfc \include\afxcmn .inl(378) : error C2065: 'TVM_SETLINECOL OR' : undeclared identifier
    E:\Program Files\VC\atlmfc \include\afxcmn .inl(394) : error C2065: 'TVIF_STATEEX' : undeclared identifier
    E:\Program Files\VC\atlmfc \include\afxcmn .inl(396) : error C2065: 'TVIF_EXPANDEDI MAGE' : undeclared identifier
    E:\Program Files\VC\atlmfc \include\afxcmn .inl(396) : error C2065: 'TVIF_EXPANDEDI MAGE' : undeclared identifier
    E:\Program Files\VC\atlmfc \include\afxcmn 2.inl(39) : error C2065: 'UDM_GETPOS32' : undeclared identifier

    ---

    How can i resolve these errors , please suggest.
    Thanks in advance.

    Vikrant
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    I looked up "TVM_GETLINECOL OR" and apparently it is a message that gets the current line color of an unmanaged TreeView...the version of TreeView control that VB6 uses. The unmanaged version of the TreeView control is completely different from the .NET managed version of the TreeView control.

    Not everything is going to be correctly converted to VB.NET when migrating from VB6. You are going to have to make make modifications to the code produced by the migration to make sure that that the things that couldn't be migrated are fixed.

    In this case I'd say that you're probably going to have to take a look at the code that was managing the TreeView and modify it so that the properties of the .NET TreeView Control... for example in this case you would have to change the TVM_GETLINECOLO R to the TreeView.LineCo lor Property.

    -Frinny

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      I am curious why the new visual studio is even looking at a .ini file for code?

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Hmm I didn't notice the extension earlier...
        It's actually not an .ini file...it's a .inl extension (what is that??)

        -Frinny

        Comment

        • VikrantS
          New Member
          • Nov 2009
          • 2

          #5
          The errors mentioned above are not from the MFC code of the project,instead they are generated from some files i.e.afxcmn.inl, afxcmn1.inl, afxcmn2.inl . Maybe these files contain inline functions for common controls .
          Since the error shows Undeclared identifier, the project maybe missing some header files to be included, in which these constants are declared.

          ??

          VikrantS

          Comment

          Working...