Bug in TIcon

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Bug in TIcon

Post by Enrico Maria Giordano »

This is the sample:

Code: Select all

#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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Bug in TIcon

Post by Enrico Maria Giordano »

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

EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Enrico,

have you tried to assign it a "NULL" brush ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

EnricoMaria wrote:How?

Code: Select all

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

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

Sorry, no change:

Code: Select all

#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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Enrico,

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

Antonio Linares
www.fivetechsoft.com
Post Reply