Fix for FWH 7.11

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Fix for FWH 7.11

Post by Antonio Linares »

This is a necesary fix for FWH 7.11 in Class TMsgBar:

Code: Select all

METHOD SetMsg( cText ) CLASS TMsgBar

   DEFAULT ::cMsg := ""
   
   if ::l2007
      ::cMsg = cText
      ::Refresh()
      return nil
   endif   
   
   ::GetDC()   // must be placed here!!!
   ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
kajot
Posts: 309
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Post by kajot »

I can't complite this source ( FWH 7.11 and xAHRBOUR.COM November 2007)

my log:
Type: C >>>xhb.exe -o"Obj\msgbar.c" -m -n -p -q -gc0 -B -D-w2 -I"C:\fwh\include" -I"R:\include" -I"R:\include\w32" "Source\Classes\msgbar.prg"<<<

xHarbour Compiler build 1.0.0 (SimpLex)
Copyright 1999-2007, http://www.xharbour.org http://www.harbour-project.org/

Source\Classes\msgbar.prg(304) Error E0020 Incomplete statement or unbalanced delimiters

Source\Classes\msgbar.prg(379) Warning W0003 Variable: 'NFLAGS' declared but not used in function: 'TMSGBAR_LBUTTONDOWN(364)'

1 error

No code generated

Type: C >>>Couldn't build: msgbar.obj<<<
Type: C >>>TMAKEOBJECT<<<
Type: C >>>TMAKEOBJECT:REFRESH<<<
Type: N >>> 1322<<<
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

> Source\Classes\msgbar.prg(304) Error E0020 Incomplete statement or unbalanced delimiters

What source code do you have at line 304 ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
kajot
Posts: 309
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Post by kajot »

sorry, I leave one )
User avatar
Patrick Mast
Posts: 244
Joined: Sat Mar 03, 2007 8:42 pm

Re: Fix for FWH 7.11

Post by Patrick Mast »

Antonio Linares wrote:This is a necesary fix for FWH 7.11 in Class TMsgBar:

Code: Select all

METHOD SetMsg( cText ) CLASS TMsgBar

   DEFAULT ::cMsg := ""
   
   if ::l2007
      ::cMsg = cText
      ::Refresh()
      return nil
   endif   
   
   ::GetDC()   // must be placed here!!!
   ...
What goes wrong if we don't do this fix?

Patrick
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Patrick,

Its a bad memory leak, as a hDC is created everytime the mouse is moved, and it is not released!

That fix should be applied inmediately if 2007 clause is used
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Patrick Mast
Posts: 244
Joined: Sat Mar 03, 2007 8:42 pm

Post by Patrick Mast »

Antonio Linares wrote:Patrick,

Its a bad memory leak, as a hDC is created everytime the mouse is moved, and it is not released!

That fix should be applied inmediately if 2007 clause is used
Ok, thank you.

Patrick
Post Reply