Bug in TIcon

Bug in TIcon

Postby Enrico Maria Giordano » Wed Oct 19, 2005 1:11 pm

This is the sample:

Code: Select all  Expand view
#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: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TIcon

Postby Enrico Maria Giordano » Wed Oct 19, 2005 1:20 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Wed Oct 19, 2005 4:14 pm

Enrico,

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

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


Postby Antonio Linares » Wed Oct 19, 2005 4:59 pm

EnricoMaria wrote:How?


Code: Select all  Expand view
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
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Wed Oct 19, 2005 6:06 pm

Sorry, no change:

Code: Select all  Expand view
#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
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

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



Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 66 guests