Fix for FWH 7.11

Fix for FWH 7.11

Postby Antonio Linares » Fri Nov 16, 2007 11:56 pm

This is a necesary fix for FWH 7.11 in Class TMsgBar:
Code: Select all  Expand view
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
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby kajot » Sat Nov 17, 2007 11:10 am

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
kajot
 
Posts: 339
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Postby Antonio Linares » Sat Nov 17, 2007 12:42 pm

> 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
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby kajot » Sat Nov 17, 2007 1:28 pm

sorry, I leave one )
User avatar
kajot
 
Posts: 339
Joined: Thu Nov 02, 2006 6:53 pm
Location: Poland

Re: Fix for FWH 7.11

Postby Patrick Mast » Wed Nov 21, 2007 7:18 pm

Antonio Linares wrote:This is a necesary fix for FWH 7.11 in Class TMsgBar:
Code: Select all  Expand view
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
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby Antonio Linares » Wed Nov 21, 2007 7:19 pm

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
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Patrick Mast » Thu Nov 22, 2007 10:40 am

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
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 86 guests

cron