Sr. Antonio,
Ao redimensionar a window principal, a message bar apresenta um BUG.
set message of ownd to "Bom trabalho..." clock date keyboard font ofontem noinset 2007
Veja:
AEval( ::aItem, { | o | if( o:hBitmap1 != nil, DeleteObject( o:hBitmap1 ), ),;
if( o:hBitmap2 != nil, DeleteObject( o:hBitmap2 ), ) } )
AEval( ::aItem, { | o | if( o:hBitmap1 != nil, DeleteObject( o:hBitmap1 ), ),;
if( o:hBitmap2 != nil, DeleteObject( o:hBitmap2 ), ),;
if( o:hBack != nil, DeleteObject( o:hBack ), ) } )
::Say( ::nHeight / 4 - 2,;
If( ::lCentered, ( ::nWidth / 2 ) - ( GetTextWidth( ::hDC,;
If( Empty( ::cMsg ), ::cMsgDef, ::cMsg ),;
::nClrText,,, .T., .T. )
::Say( ::nHeight / 4 - 2,;
If( ::lCentered, ( ( ( If( Len( ::aItem ) > 0, ::aItem[ 1 ]:nLeft(), ::nWidth ) ) ) / 2 ) - ( GetTextWidth( ::hDC,;
If( Empty( ::cMsg ), ::cMsgDef, ::cMsg ),;
::oWnd:oFont:hFont ) / 2 ), 4 ),;
If( Empty( ::cMsg ), ::cMsgDef, ::cMsg ),;
::nClrText,,, .T., .T. )
DATA hBack
METHOD Paint() CLASS TMsgItem
local nCount, nClrBack
local nLeft := ::nLeft()
local hBmp, nBmpWidth := 0
local hDC := ::oMsgBar:GetDC()
local hDCMem, hOld
if ::oMsgBar:l2007
::oMsgBar:PaintBar( nLeft, ::nWidth )
hDCMem = CreateCompatibleDC( hDC )
If ::hBack == NIL
::hBack = CreateCompatibleBitmap( hDC, ::nWidth + 4, ::oMsgBar:nHeight )
hOld = SelectObject( hDCMem, ::hBack )
BitBlt( hDCMem, 0, 0, ::nWidth + 4, ::oMsgBar:nHeight, hDC, ::nLeft() - 4, 0, 0xCC0020 )
SelectObject( hDCMem, hOld )
endif
hOld = SelectObject( hDCMem, ::hBack )
BitBlt( hDC, ::nLeft() - 4, 0, ::nWidth + 4, ::oMsgBar:nHeight, hDCMem, 0, 0, 0xCC0020 )
DeleteDC( hDCMem )
endif
if ::hBitmap1 != nil
hBmp = If( ::lActive, ::hBitmap1, ;
If( ::hBitmap2 != nil, ::hBitmap2, ::hBitmap1 ) )
nBmpWidth = nBmpWidth( hBmp )
DrawMasked( hDC, hBmp, 2, nLeft + 1 )
endif
if ::oMsgBar:l2007
::oMsgBar:Say( ::oMsgBar:nHeight / 4 - 2,;
nLeft - 1 + ( ::nWidth / 2 ) - ( GetTextWidth( hDC, AllTrim( ::cMsg ), ::oFont:hFont ) / 2 ),;
AllTrim( ::cMsg ), If( ::lActive, ::nClrText, ::nClrDisabled ),;
::nClrPane, ::oFont, .T., .T. )
WndBoxIn( hDC, 2, nLeft - 4, ::oMsgBar:nHeight - 2, nLeft - 3 )
else
DrawMsgItem( hDC, ::cMsg,;
{ 5, nLeft + nBmpWidth, ::oMsgBar:nHeight - 6,;
nLeft + ( ::nWidth - 4 ) },;
If( ::lActive, ::nClrText, ::nClrDisabled ),;
::nClrPane, ::oFont:hFont )
WndBoxIn( hDC, 0, nLeft - 4, ::oMsgBar:nHeight - 1, nLeft - 3 ) // Statusbar Parts look
if ::oMsgBar:lInset
WndBoxIn( hDC, 3, nLeft + 1, ::oMsgBar:nHeight - 5, nLeft + ::nWidth - 4 ) // Original Depressed Look
endif
endif
::oMsgBar:ReleaseDC()
return nil
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: jmartial and 40 guests