FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MSGItem 2007
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
MSGItem 2007
Posted: Wed Nov 07, 2007 09:08 PM

I have modify the method paint to change the msgbar
I rem

WndBoxIn( hDC, 3, nLeft - 2, ::oMsgBar:nHeight-5, nLeft + ::nWidth - 6 )

and I insert

WndBoxRaised( hDC, 0, nLeft - 4, 22, nLeft + ::nWidth -1)

Now when I define a msgitem ( txt) it show the txt on white background

I insert also before the DrawMsgItem function the command SetBkMode( hDC, 1 )

but it not change the error ... How I can make it ?

Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
MSGItem 2007
Posted: Thu Nov 08, 2007 06:17 AM

Silvio,

Do you want the msgitem to paint transparent over the light blue gradient ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
MSGItem 2007
Posted: Thu Nov 08, 2007 09:01 AM

yes look thi s message on footer http://fivetechsoft.com/forums/viewtopic.php?t=8744

there is the picture

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
MSGItem 2007
Posted: Thu Nov 08, 2007 12:20 PM

can i insert gradient color on tabs class ?
I must create a new variable ( l2007) ?

Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
MSGItem 2007
Posted: Thu Nov 08, 2007 12:54 PM
Silvio,

MsgItems can be painted transparent, modifying the DRAWMSGITEM() function this way:
...
   SetBkMode( hDC, TRANSPARENT );  // new

   // ExtTextOut( hDC, 2, 4, ETO_OPAQUE, &rc, "", 0, 0 ); no
   DrawText( hDC, cMsg, wLen, &rc, DT_CENTER);

The problem is that the background is not erased, so the new text does not erase the previous one. i.e.: see the clock running. We need to find a workaround for it
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
MSGItem 2007
Posted: Thu Nov 08, 2007 12:56 PM

Silvio,

> can i insert gradient color on tabs class ?

Do you mean Class TTabs ?

> I must create a new variable ( l2007) ?

yes, that would be the right way

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
MSGItem 2007
Posted: Thu Nov 08, 2007 01:21 PM
Antonio Linares wrote:The problem is that the background is not erased, so the new text does not erase the previous one. i.e.: see the clock running. We need to find a workaround for it


Just draw a series of spaces and then the proper cMsg.

EMG
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
MSGItem 2007
Posted: Thu Nov 08, 2007 01:34 PM

where i can found drawmsgitem function ?

Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
MSGItem 2007
Posted: Thu Nov 08, 2007 01:50 PM

Enrico,

> Just draw a series of spaces and then the proper cMsg.

FWH uses to do that, but if the backgound has a gradient painting then its not a longer valid solution :-(

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
MSGItem 2007
Posted: Thu Nov 08, 2007 01:51 PM

Silvio,

> where i can found drawmsgitem function ?

source\function\drawitem.c

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
MSGItem 2007
Posted: Thu Nov 08, 2007 02:41 PM

> can i insert gradient color on tabs class ?

Do you mean Class TTabs ?

> I must create a new variable ( l2007) ?

yes, that would be the right way


Is it possible to have 2007 look for TTabs control also ?

Regards



G. N. Rao.

Hyderabad, India
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
MSGItem 2007
Posted: Thu Nov 08, 2007 03:33 PM

thanks Antonio

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
MSGItem 2007
Posted: Thu Nov 08, 2007 06:03 PM

Antonio, I insert the code you sent me :

SetBkMode( hDC, TRANSPARENT ); // new

// ExtTextOut( hDC, 2, 4, ETO_OPAQUE, &rc, "", 0, 0 ); no
DrawText( hDC, cMsg, wLen, &rc, DT_CENTER);

but not run ok

Then Another question I wanted modify the color when the mouse is over the msgitem
where I must modify this color ?

Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
MSGItem 2007
Posted: Thu Nov 08, 2007 06:37 PM

Silvio,

yes, I know, thats what I commented. We need to find a way to repaint the background properly.

Do you want to change the color of the msgitem text when the mouse is over ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
MSGItem 2007
Posted: Thu Nov 08, 2007 07:03 PM
Antonio Linares wrote:Enrico,

> Just draw a series of spaces and then the proper cMsg.

FWH uses to do that, but if the backgound has a gradient painting then its not a longer valid solution :-)


Can't you use the same technique used for the page number in rpreview.prg?

EMG