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

    Changing a class to another

    Hi!
    I'm working on an SDI application that has to be able to scroll more than 32768. Recently I found a class derrived from CScrollView called CBigScrollView that could scroll more than 32768.
    I added the files (CBigCrollView.cpp and CBigScrollView.h) to my project. I then changed all the references to CFormView to CBigScrollView in my old View-class (the one MSVC generates for you when you start a new project). I also included the header-file for CBigScrollView in both my old View-class source file and in my Application-source file. When I then tried to compile my project I got an error message that said that CBigScrollView was undefined.

    class CMyView : public CBigScrollView // The error occurs here.

    I'm quite new to C and I'm really not sure this is the right way to do it. If anyone knows how I can fix it please help me!

    By the way, I'm using MSVC++ 6.

    Help is really appreciated!

    Sincerely,
    Richard Peterson


  2. #2
    Join Date
    May 1999
    Location
    Germany
    Posts
    106

    Re: Changing a class to another

    Hi Richard,

    please check, if you included the headers in the right order. When your compiler reads

    class CMyView : public CBigScrollView

    in MyView.h the header for the CBigScrollView has to be already included.

    #include<BigScrollView.h>
    #include<MyView.h>

    not

    #include<MyView.h>
    #include<BigScrollView.h>

    Good luck!
    Peter

    P.S.: Please write a short answer, if you had success.




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