FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Little bitmap misalignment in TMsgItem
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Little bitmap misalignment in TMsgItem
Posted: Sat Jan 10, 2009 11:15 PM
In the following sample, the bitmap and the text in the msgbar are not aligned:

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd

    DEFINE WINDOW oWnd

    SET MESSAGE OF oWnd 2007

    DEFINE MSGITEM OF oWnd:oMsgBar;
           SIZE 20;
           BITMAP "c:\fwh\bitmaps\16x16\lock.bmp"

    DEFINE MSGITEM OF oWnd:oMsgBar;
           SIZE 55;
           PROMPT "TEST"

    ACTIVATE WINDOW oWnd

    RETURN NIL


This seems a proper fix (method Paint() of TMsgItem):

DrawMasked( hDC, hBmp, 2, nLeft + 1 )


EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Little bitmap misalignment in TMsgItem
Posted: Fri Jan 23, 2009 09:35 PM

Enrico,

Implemented. Thanks! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Little bitmap misalignment in TMsgItem
Posted: Fri Jan 23, 2009 09:49 PM

Thank you!

EMG

Continue the discussion