Re: [ROOT] TGWin32::fMaxCol never set

From: Valeri Fine (fine@bnl.gov)
Date: Tue May 29 2001 - 00:33:52 MEST


Hi, Alex, 

I guess it is a side effect if making Windows version of ROOT with no libNew.
That did zero all data-members and kept the problem hidden for a while.
In past the method TGWin32::MakePallete was called from within TGWin32 ctor.
Then the X11 part was changed and one adjusted WIN32 implementation.
This is why calling TGWin32::MakePallete  was moved leaving flpPalette 
not initializied at the construction time. It was Ok since that data-member was
set to "0" via ROOT new/delete operators.

Can you try the correction as follows:


cvs diff -u
cvs server: Diffing .
Index: TGWin32.cxx
===================================================================
RCS file: /user/cvs/root/win32/src/TGWin32.cxx,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 TGWin32.cxx
--- TGWin32.cxx 2000/05/16 17:00:46     1.1.1.1
+++ TGWin32.cxx 2001/05/28 22:29:07
@@ -456,7 +456,8 @@

/*  Check whether we can use palette

-  static LPLOGPALETTE flpPalette = 0;
+   flpPalette = 0;
+   fMaxCol    = 0;

 Thank you
                            Valeri

----- Original Message ----- 
From: "Axel Naumann" <axel@fnal.gov>
To: "Roottalk@Pcroot. Cern. Ch" <roottalk@pcroot.cern.ch>
Sent: Monday, May 28, 2001 4:02 PM
Subject: [ROOT] TGWin32::fMaxCol never set


> Hi,
> 
> TGWin32::MakePallete() never gets called, that's why TGWin32::fMaxCol is
> never set. I get some
> ---
>  Error the current Video card doesn't provide 222, Only -1163005939 colors
> are s
> upplied
> ---
> and uninitialized colors (for some reason only in MSVC's "Go" mode... very
> strange...) due to this.
> 
> Could somebody change that?
> 
> Cheers, Axel.
> 
> 





This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:47 MET