Saludos JLL:
Al comparar el c贸digo de
TMsgItem encontr茅 el siguiente cambio en el m茅todo
PAINT
Ver 907
聽 if ::oMsgBar:l2007
聽 聽 聽 ::oMsgBar:PaintBar( nLeft, ::nWidth )
聽 聽endif
Ver 1109
聽 if ::oMsgBar:l2007 .or. ::oMsgBar:l2010
聽 聽 聽 ::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
Creo que el problema esta relacionado con ::hBack
y para probarlo modifique el ejemplo
testmbar
// Testing Bitmaps in the MsgBar
#include "FiveWin.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
聽 聽local lMail := .t., oBar
聽 聽local oMsgItem, oMsgItemMail
聽 聽DEFINE WINDOW oWnd TITLE "Testing MsgBar with bitmaps"
聽 聽DEFINE BUTTONBAR oBar OF oWnd _3D
聽 聽@ 10,10 CHECKBOX lMail PROMPT "E-Mail" 聽OF oWnd ;
聽 聽 聽 聽 聽 聽SIZE 200, 35 COLOR CLR_BLACK ;
聽 聽 聽 聽 聽 聽ON CHANGE If( ! lMail, oWnd:oMsgBar:DelItem( oMsgItemMail ), ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 oWnd:oMsgBar:InsItem( oMsgItemMail, 2 ) )
聽 聽SET MESSAGE OF oWnd TO "I may use different bitmaps" 2007
聽 聽DEFINE MSGITEM oMsgItem OF oWnd:oMsgBar ;
聽 聽 聽 聽 聽 PROMPT "Lock" ;
聽 聽 聽 聽 聽 SIZE 60 ;
聽 聽 聽 聽 聽 BITMAPS "..\bitmaps\16x16\lock.bmp", "..\bitmaps\16x16\unlock.bmp" ;
聽 聽 聽 聽 聽 ACTION ( oMsgItem:lActive := !oMsgItem:lActive, oMsgItem:Paint() )
聽 聽DEFINE MSGITEM oMsgItemMail OF oWnd:oMsgBar ;
聽 聽 聽 聽 聽 SIZE 24 ;
聽 聽 聽 聽 聽 BITMAPS "..\bitmaps\16x16\MAIL.BMP" ;
聽 聽 聽 聽 聽 TOOLTIP "Check the email" + CRLF + "Get email"
聽 聽DEFINE MSGITEM OF oWnd:oMsgBar ;
聽 聽 聽 聽 聽 BITMAPS "..\bitmaps\16x16\PRINTER.BMP" ;
聽 聽 聽 聽 聽 ACTION PrinterSetup() ;
聽 聽 聽 聽 聽 TOOLTIP "Setup the printer"
聽 聽oWnd:oMsgBar:DateOn()
聽 聽oWnd:oMsgBar:ClockOn()
聽 聽oMsgItem:SetText("Bloqueo") //<--- ACA EL PROBLEMA!!!!!!!!!!!!!!!!!!
聽 聽ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
El problema ocurre cuando se quiere cambiar el mensaje a un 铆tem antes de activar la ventana. Si se cambia el mensaje una vez activada la ventana todo OK.
Mi problema ahora es llevar ese c贸digo al
bOnInit de la ventana, lo cual va a ser dif铆cil en mi caso.
Por el momento tuve que eliminar ese c贸digo en la clase
TMsgItem y volver a compilar
Bueno, espero se solucione de alguna forma o tendr茅 que cambiar bastante c贸digo.
Atentamente,
Rolando.
Saludos desde Cochabamba, Bolivia