FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bug in TIcon
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Bug in TIcon
Posted: Wed Oct 19, 2005 01:11 PM
This is the sample:

#include "Fivewin.ch"


#define IDI_QUESTION    MAKEINTRESOURCE( 32514 )


FUNCTION MAIN()

    LOCAL oDlg, oIcon

    DEFINE DIALOG oDlg;
           COLOR CLR_BLACK, CLR_CYAN

    @ 1, 1 ICON oIcon OF oDlg

    ACTIVATE DIALOG oDlg;
             ON INIT oIcon:hIcon := LOADICON( 0, IDI_QUESTION );
             CENTER

    RETURN NIL


The offending code seems to be

METHOD EraseBkGnd() VIRTUAL // for transparency on dialogs

from icon.prg.

EMG
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bug in TIcon
Posted: Wed Oct 19, 2005 01:20 PM

I forgot to describe the problem: the sample shows a square of different color around the icon.

EMG

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Bug in TIcon
Posted: Wed Oct 19, 2005 04:14 PM

Enrico,

have you tried to assign it a "NULL" brush ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Bug in TIcon
Posted: Wed Oct 19, 2005 04:59 PM
EnricoMaria wrote:How?


ACTIVATE DIALOG oDlg; 
   ON INIT ( oIcon:hIcon := LOADICON( 0, IDI_QUESTION ),;
             oIcon:SetBrush( TBrush():New( "NULL" ) ) ) ; 
   CENTER
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Bug in TIcon
Posted: Wed Oct 19, 2005 06:06 PM
Sorry, no change:

#include "Fivewin.ch"


#define IDI_QUESTION    MAKEINTRESOURCE( 32514 )


FUNCTION MAIN()

    LOCAL oDlg, oIcon

    DEFINE DIALOG oDlg;
           COLOR CLR_BLACK, CLR_CYAN

    @ 1, 1 ICON oIcon OF oDlg 

    ACTIVATE DIALOG oDlg;
             ON INIT ( oIcon:hIcon := LOADICON( 0, IDI_QUESTION ),;
                       oIcon:SetBrush( TBrush():New( "NULL" ) ) );
             CENTER

    RETURN NIL


EMG
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Bug in TIcon
Posted: Wed Oct 19, 2005 10:31 PM

Enrico,

I assume you are using XP and themes enabled, right ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Continue the discussion