oWnd:say - transparent

oWnd:say - transparent

Postby Otto » Mon Nov 05, 2007 12:39 pm

I try to give out text to a window

Some text with the argument Transparent = true other with false but the argument is not respected.
After the first use of transparent the rest is transparent although the argument is set to false.
oWndPlan:Say( 150, 50, "TEST1", 8421504 ,"B",oLbxFont,.t.,.f.)<------
oWndPlan:Say( 200, 50, "TEST2", 8421504 ,"B",oLbxFont,.t.,.t.)<------
oWndPlan:Say( 250, 50, "TEST3", 8421504 ,"B",oLbxFont,.t.,.t.)<------
oWndPlan:Say( 300, 50, "TEST4", 8421504 ,"B",oLbxFont,.t.,.f.)<------

Image

#INCLUDE "FIVEWIN.CH"

STATIC oLbxFont
STATIC oWnd
STATIC oWndPlan

func Main()
DEFINE FONT oLbxFont NAME "MS Sans Serif" SIZE 10.3,15

DEFINE WINDOW oWnd FROM 1, 1 TO 35, 80 ;
TITLE "test" ;
COLOR CLR_BLACK, CLR_WHITE ; //CLR_LIGHTGRAY ;
MDI

ACTIVATE WINDOW oWnd MAXIMIZED ON INIT (planScreen())

RETURN NIL

func planScreen()
DEFINE WINDOW oWndPlan ;
MDICHILD ;
FROM 0,0 TO 800,1024 PIXEL;
TITLE ("Zimmerplan") ;
OF oWnd

ACTIVATE WINDOW oWndPlan MAXIMIZED;
ON PAINT MiPaint()

RETURN NIL

func MiPaint()
oWndPlan:Say( 150, 50, "TEST1", 8421504 ,"B",oLbxFont,.t.,.f.)
oWndPlan:Say( 200, 50, "TEST2", 8421504 ,"B",oLbxFont,.t.,.t.)
oWndPlan:Say( 250, 50, "TEST3", 8421504 ,"B",oLbxFont,.t.,.t.)
oWndPlan:Say( 300, 50, "TEST4", 8421504 ,"B",oLbxFont,.t.,.f.)
RETURN NIL
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Mon Nov 05, 2007 1:05 pm

Otto,

Do it this way:
Code: Select all  Expand view
func MiPaint()
oWndPlan:Say( 150, 50, "TEST1", 8421504 ,"B",oLbxFont,.t.,.f.)
oWndPlan:Say( 200, 50, "TEST2", 8421504 ,"B",oLbxFont,.t.,.t.)
oWndPlan:Say( 250, 50, "TEST3", 8421504 ,"B",oLbxFont,.t.,.t.)
SetBkMode( oWndPlan:hDC, 2 ) // #define OPAQUE              2
oWndPlan:Say( 300, 50, "TEST4", 8421504 ,"B",oLbxFont,.t.,.f.)
RETURN NIL
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 Antonio Linares » Mon Nov 05, 2007 1:08 pm

Its a little bug in function WSay() in source\winapi\wndsay.c:
Code: Select all  Expand view
   if( bTransparent )
      SetBkMode( hDC, TRANSPARENT );
   else    // new
      SetBkMode( hDC, OPAQUE ); // new

Fixed. Thanks for your feedback :-)
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 Otto » Mon Nov 05, 2007 1:28 pm

Is is OK if I download the 7.11 version?
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Mon Nov 05, 2007 1:36 pm

Otto,

This fix is not included in 7.11, but if we publish it again, then we will include it
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 Otto » Mon Nov 05, 2007 1:44 pm

To you plan to publish it soon?
Last edited by Otto on Mon Nov 05, 2007 3:53 pm, edited 1 time in total.
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Mon Nov 05, 2007 1:59 pm

Otto,

If some bugs appear (hopefully not) then we may publish it again :-)
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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 64 guests