Click to See Complete Forum and Search --> : Changing a class to another


June 18th, 1999, 10:54 AM
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

pherweg
June 19th, 1999, 06:18 AM
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.