MSGItem 2007

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

MSGItem 2007

Post by Silvio »

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

Post by Antonio Linares »

Silvio,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

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

Post by Silvio »

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

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

Post by Antonio Linares »

Silvio,

MsgItems can be painted transparent, modifying the DRAWMSGITEM() function this way:

Code: Select all

...
   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: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

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

Post by Silvio »

where i can found drawmsgitem function ?
Best Regards, Saludos

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

Post by Antonio Linares »

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: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Silvio,

> where i can found drawmsgitem function ?

source\function\drawitem.c
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

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

Post by Silvio »

thanks Antonio
Best Regards, Saludos

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

Post by Silvio »

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

Post by Antonio Linares »

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
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

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
Post Reply