Hi H.-Gerd,
you can use the following correct files with included VisualStudio project file (mftest.dsw)
1. download them to $ROOTSYS/test directory
2. double click on mftest.dsw
3. build and enjoy ;-)
HTH. Regards. Valeriy
> Hello Valeriy,
>
> thanks for your reply. I tried the hints you gave me and my code
> looks like that now:
>
> file: file://--- Main -----------------------------------------------
> // Root-Libraries
> #include <TApplication.h>
> #include <TGClient.h>
>
> // Own class
> #include "MFTest.h"
>
> int main ( int argc, char** argv )
> {
> TApplication application( "ROOT App", &argc, argv );
> MFTest t( gClient->GetRoot() );
> application.Run();
> return 0;
> }
>
> file: file://--- MFTest Header -----------------------------------
> #ifndef MFTEST_H
> #define MFTEST_H
>
> #include <TGFrame.h>
>
> using namespace std;
>
> class MFTest : public TGMainFrame
> {
> public:
> MFTest( const TGWindow*, UInt_t = 800, UInt_t = 600 );
> ~MFTest();
>
> // Macro
> ClassDef( MFTest,0 );
> };
>
> #endif
>
>
> file: file://--- MFTest Implementation ---------------------------
> #include "MFTest.h"
>
> MFTest::MFTest( const TGWindow* p, UInt_t height, UInt_t width ) :
> TGMainFrame( p, height, width )
> {
> MapWindow();
> }
>
>
> MFTest::~MFTest() {}
>
> file://------------------------------------------------------------------
>
> I created a new dictionary and recompiled all, but the program
> still crashes at runtime at MapWindow() with the message,
> "HEAP[client_win32.exe]: Heap block at 020152D8 modified at 020152CC
> past requested size of ffffffe5". I am sure you see that
> client_win32.exe is my program.
>
> Before compilation I removed libNew.lib from my project libraries
> because the library was cause for some errors at compile-time.
> This was the advised way from earlier postings to cope the obstacle.
> However, I don't think that's the cause for my problem.
>
> I use all recommended compiler-flags (e. g. -GX), replaced all
> dlls as advised and did all other stuff for ROOT for windows.
> I compiled the app with VC++ single- and multithread-option.
>
> Some more ideas?
>
> H.-Gerd
>
>
>
> On Thu, 2003-07-31 at 16:17, Valeriy Onuchin wrote:
> > Hi H.-Gerd Rosarius,
> > I appologize for some typos in my previous message.
> >
> > 4. use ClassDef( MFTest, 0)
> > 0 - you don't need object I/O
> > Check also http://root.cern.ch/root/Using.html
> >
> > Regards. Valeriy
> >
> > > H.-Gerd Rosarius,
> > > 0. look at test/guiviewer.h test/guivieer.cxx code and Makefile
> > > 1. use TApplication (not TGApplication).
> > > 2. do not include RQ_OBJECT( "MFTest" )
> > > That is required anly for interpreted classes.
> > > 3. create LinkDef.h and dictionary for MFTest class
> > >
> > > Must work.
> > >
> > > HTH. Regards. Valeriy
>
>
>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET