FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Bug message bar com 2007
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM

Bug message bar com 2007

Posted: Mon Jan 04, 2010 04:23 PM
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:
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM

Re: Bug message bar com 2007

Posted: Wed Jan 06, 2010 07:19 PM

?

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Bug message bar com 2007

Posted: Mon Jan 25, 2010 11:12 AM

SGS,

Puedes proporcionar un ejemplo, en PRG, que reproduzca el error ? gracias

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM

Re: Bug message bar com 2007

Posted: Mon Jan 25, 2010 12:43 PM

Sr. Antonio:

fwh/samples/test2007.prg

Basta redimensionar a window principal de modo que a mensagem estoure o tamanho da set message...

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM

Re: Bug message bar com 2007

Posted: Tue Mar 09, 2010 05:34 PM

Sr. Antonio,

Alguma novidade sobre este bug? ou poderia me dizer em que PRG (source) devo procurar o problema!

Obrigado

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM

Re: Bug message bar com 2007

Posted: Wed Mar 10, 2010 04:58 AM
The problem is true.

Sample used : \Fwh\Samples\Test2007.prg

Screen snapshot of the window


Screen snapshot of the window after resizing. The MsgBar MsgItems are overlapped


Regards
Anser
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Bug message bar com 2007

Posted: Wed Mar 10, 2010 08:18 AM

Deberíamos decidir que items deben verse en esa situación: los de más a la derecha o solo el de la izquierda ?

We should decide what items to show on such situation: the rightmost ones or just the leftmost one ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM

Re: Bug message bar com 2007

Posted: Wed Mar 10, 2010 11:07 AM

Sr. Antonio,

clausula->2007 Deveria funcionar igual a barra default (sem 2007).

set message of ownd to "Bom trabalho..." clock date keyboard font ofontem noinset 2007 <----BUG

set message of ownd to "Bom trabalho..." clock date keyboard font ofontem noinset <----OK

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM

Re: Bug message bar com 2007

Posted: Sat Mar 13, 2010 11:01 AM

Sr. Antonio,

Alguma novidade?

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM

Re: Bug message bar com 2007

Posted: Mon Mar 15, 2010 05:05 AM
SGS.

Problema resuelto...

hay que hacer cambios en TmsgBar (msgbar.prg)

METHOD Destroy()
Busca

Code (fw): Select all Collapse
   AEval( ::aItem, { | o | if( o:hBitmap1 != nil, DeleteObject( o:hBitmap1 ), ),;
                           if( o:hBitmap2 != nil, DeleteObject( o:hBitmap2 ), ) } )


Reemplaza:
Code (fw): Select all Collapse
   AEval( ::aItem, { | o | if( o:hBitmap1 != nil, DeleteObject( o:hBitmap1 ), ),;
                           if( o:hBitmap2 != nil, DeleteObject( o:hBitmap2 ), ),;
                           if( o:hBack != nil, DeleteObject( o:hBack ), ) } )


METHOD Pain()
Busca:
Code (fw): Select all Collapse
::Say( ::nHeight / 4 - 2,;
             If( ::lCentered, ( ::nWidth / 2 ) - ( GetTextWidth( ::hDC,;
             If( Empty( ::cMsg ), ::cMsgDef, ::cMsg ),;
             ::nClrText,,, .T., .T. )


Reemplaza:
Code (fw): Select all Collapse
::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. )


Terminados cambios en clase TMsgBar

Cambios en la clase TmsgItem ( tmsgitem.prg )

Crear data nueva:

Code (fw): Select all Collapse
DATA hBack


Reemplazar metodo paint
Code (fw): Select all Collapse
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
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM

Re: Bug message bar com 2007

Posted: Mon Mar 15, 2010 01:46 PM

Daniel,

Espetacular !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Meus Parabéns !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

:D:mrgreen:

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin

Continue the discussion