MSGItem 2007

MSGItem 2007

Postby Silvio » Wed Nov 07, 2007 9: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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Thu Nov 08, 2007 6:17 am

Silvio,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Thu Nov 08, 2007 9: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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Silvio » 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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Thu Nov 08, 2007 12:54 pm

Silvio,

MsgItems can be painted transparent, modifying the DRAWMSGITEM() function this way:
Code: Select all  Expand view
...
   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
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby Enrico Maria Giordano » Thu Nov 08, 2007 1: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
User avatar
Enrico Maria Giordano
 
Posts: 8356
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Silvio » Thu Nov 08, 2007 1:34 pm

where i can found drawmsgitem function ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Thu Nov 08, 2007 1: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Thu Nov 08, 2007 1:51 pm

Silvio,

> where i can found drawmsgitem function ?

source\function\drawitem.c
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby nageswaragunupudi » Thu Nov 08, 2007 2: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
User avatar
nageswaragunupudi
 
Posts: 10295
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby Silvio » Thu Nov 08, 2007 3:33 pm

thanks Antonio
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Silvio » Thu Nov 08, 2007 6: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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Thu Nov 08, 2007 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Thu Nov 08, 2007 7: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
User avatar
Enrico Maria Giordano
 
Posts: 8356
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 30 guests