Page 1 of 3

MSGItem 2007

Posted: Wed Nov 07, 2007 9:08 pm
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 ?

Posted: Thu Nov 08, 2007 6:17 am
by Antonio Linares
Silvio,

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

Posted: Thu Nov 08, 2007 9:01 am
by Silvio
yes look thi s message on footer http://fivetechsoft.com/forums/viewtopic.php?t=8744

there is the picture

Posted: Thu Nov 08, 2007 12:20 pm
by Silvio
can i insert gradient color on tabs class ?
I must create a new variable ( l2007) ?

Posted: Thu Nov 08, 2007 12:54 pm
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

Posted: Thu Nov 08, 2007 12:56 pm
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

Posted: Thu Nov 08, 2007 1:21 pm
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

Posted: Thu Nov 08, 2007 1:34 pm
by Silvio
where i can found drawmsgitem function ?

Posted: Thu Nov 08, 2007 1:50 pm
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 :-(

Posted: Thu Nov 08, 2007 1:51 pm
by Antonio Linares
Silvio,

> where i can found drawmsgitem function ?

source\function\drawitem.c

Posted: Thu Nov 08, 2007 2:41 pm
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 ?

Posted: Thu Nov 08, 2007 3:33 pm
by Silvio
thanks Antonio

Posted: Thu Nov 08, 2007 6:03 pm
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 ?

Posted: Thu Nov 08, 2007 6:37 pm
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 ?

Posted: Thu Nov 08, 2007 7:03 pm
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