Folder SAY background-color is still missing ?

Folder SAY background-color is still missing ?

Postby ukoenig » Wed Jan 11, 2017 8:01 pm

Hello,

I noticed a old folderproblem of the missing SAY background-color.

Is there intermediately any solution ?

best regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Folder SAY background-color is still missing ?

Postby Antonio Linares » Thu Jan 12, 2017 7:59 am

Uwe,

Could you provide a small example or a screenshot ? thanks
regards, saludos

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

Re: Folder SAY background-color is still missing ?

Postby ukoenig » Thu Jan 12, 2017 10:38 am

Antonio,

working on a new extended folder-sample :

Dlg-textbackground is ok, on folderpages SAYS are shown transparent
A defined SAY-backgroundcolor is not visible.
The problem has been posted some times ago

Image

regards
Uwe :?:
Last edited by ukoenig on Thu Jan 12, 2017 9:26 pm, edited 2 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Folder SAY background-color is still missing ?

Postby Antonio Linares » Thu Jan 12, 2017 11:07 am

Uwe,

Do you mean that the background of this SAY should be green ?

Image

How are you setting the background of the folder pages ?
regards, saludos

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

Re: Folder SAY background-color is still missing ?

Postby ukoenig » Thu Jan 12, 2017 11:26 am

Antonio,

Yes the folder SAY-backgrounds I wanted green
I will post the complete sample as soon it is finished.

The different folderpage-backgrounds are called on Dlg-init

Code: Select all  Expand view

...
...
ACTIVATE DIALOG oDlg1 CENTER ;
ON INIT F_BACKGRD( oFld1, .T. )

RETURN NIL

// --------  FOLDER - Backgrounds ( n are the different folderpages ) ---------------

FUNCTION F_BACKGRD( oFld, lTransp )
LOCAL n, oDlg, hDC, oBrush, oImage, nRow := 0, nCol := 0

oFld:lTransparent := lTransp

FOR n := 1 to Len( oFld:aDialogs )
    oDlg := oFld:aDialogs[ n ]
    hDC = CreateCompatibleDC( oDlg:GetDC() )
    IF n = 1
        IF !FILE( c_path1 + "Marble.bmp" )
            MsgAlert( "File : " + c_path1 + "Marble.bmp" + CRLF + ;
                    "does not exist to create" + CRLF + ;
                    "Brush-Background !", "ATTENTION" )
        ELSE
            DEFINE BRUSH oBrush FILENAME c_path1 + "Marble.bmp"
            oDlg:SetBrush( oBrush )
            RELEASE BRUSH oBrush
            ReleaseDC(hDC)
        ENDIF
    ENDIF
    IF n = 2
        DEFINE BRUSH oBrush COLOR 16107689
        oDlg:SetBrush( oBrush )
        RELEASE BRUSH oBrush
        ReleaseDC(hDC)
    ENDIF
    IF n = 3 // GRADIENT
        aGrad := { { 0.9, 16107689, 16777215 }, { 0.9, 16777215, 16107689 } }
        hDC = CreateCompatibleDC( oDlg:GetDC() )
        hBmp = CreateCompatibleBitMap( oDlg:hDC, oDlg:nRight * 2.1, ( oDlg:nBottom * 2.1 ) - 40 )
        hBmpOld = SelectObject( hDC, hBmp )
        GradientFill( hDC, 0, 0, ( oDlg:nBottom * 2.1 ) - 40, oDlg:nRight * 2.1, aGrad, .T. ) // .T: = Vertical
        DeleteObject( oDlg:oBrush:hBrush )
        oBrush := TBrush():New( ,,,, hBmp )
        oBrush:Cargo  := aGrad
        SelectObject( hDC, hBmpOld )
        oDlg:SetBrush( oBrush )
        RELEASE BRUSH oBrush
        ReleaseDC(hDC)
    ENDIF
    IF n = 4 // Image ADJUSTED
        DEFINE IMAGE oImage FILE c_path1 + "Backgrd.jpg"
        oBrush := TBrush():new( ,,,, ResizeBmp( oImage:hBitmap, oDlg:nWidth, oDlg:nHeight, .T. ) )
        oImage:End()
        oDlg:SetBrush( oBrush )
        RELEASE BRUSH oBrush
        ReleaseDC(hDC)
    ENDIF
    IF n = 5 // Image ADJUSTED
        DEFINE IMAGE oImage FILE c_path1 + "Backgrd.jpg"
        oBrush := TBrush():new( ,,,, ResizeBmp( oImage:hBitmap, oDlg:nWidth, oDlg:nHeight, .T. ) )
        oImage:End()
        oDlg:SetBrush( oBrush )
        RELEASE BRUSH oBrush
        ReleaseDC(hDC)
    ENDIF
    AEval( oDlg:aControls, { |o| IF( o:ClassName == "TSAY", ( o:SetColor( nTxtColor, 13885951 ), o:Refresh() ), NIL ) } )
NEXT

RETURN( NIL )
 


Another screenshot from page 3
testing different controls on each folderpage

Image

regards
Uwe :D
Last edited by ukoenig on Fri Jan 13, 2017 5:11 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Folder SAY background-color is still missing ?

Postby TimStone » Thu Jan 12, 2017 7:31 pm

Is this with 16.12 ?

Antonio, I wonder if "transparency" could be contributing to the issues I discussed with you. Were there any changes in it's implementation from 16.11 to 16.12 ?

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Folder SAY background-color is still missing ?

Postby Antonio Linares » Fri Jan 13, 2017 9:09 am

Uwe,

great example. I look forward to test it once you publish it. Many thanks


Tim,

Please use source/function/imgtxtio.prg from FWH 16.11 and compile it and link it as part of your app,
and lets see if this makes a difference. Many thanks for your feedback and tests
regards, saludos

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

Re: Folder SAY background-color is still missing ?

Postby nageswaragunupudi » Fri Jan 13, 2017 4:29 pm

Mr Uwe

Can you please explain what is the problem?
You wanted SAY to be NOT transparent.
In your images, we see that the SAY is NOT transparent. That is what you wanted. Right?
If so what is the problem?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Folder SAY background-color is still missing ?

Postby ukoenig » Fri Jan 13, 2017 5:16 pm

Mr. Rao,

Including all possible controls I noticed
the missing backgroundcolor of SAY's inside folderpages.

Image

from DIALOG is OK
//------------------------
@ 210, 225 SAY oSay[1] PROMPT "Testing SAY" SIZE 80, 15 FONT oFont2 OF oDlg1 PIXEL
oSay[1]:SetColor( nTxtColor, nBackColor )


inside FOLDERPAGE no background-color
//----------------------------------------------
@ 115, 10 SAY oSay[2] PROMPT "Testing SAY - color" SIZE 100, 15 FONT oFont2 OF oFld1:aDialogs[ 1 ] PIXEL
oSay[2]:SetColor( nTxtColor, nBackColor )


TRANSPARENT SAY works

Image

regards
Uwe :?:
Last edited by ukoenig on Sat Jan 14, 2017 1:46 pm, edited 2 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Folder SAY background-color is still missing ?

Postby TimStone » Fri Jan 13, 2017 5:48 pm

Antonio,

Just spotted that message. When I added the file, the link failed with Microsoft and the following logged errors:

Code: Select all  Expand view

FiveH32.lib(IMGTXTIO.obj) : error LNK2005: _HB_FUN_CALCTEXTWH already defined in imgtxtio.obj
FiveH32.lib(IMGTXTIO.obj) : error LNK2005: _HB_FUN_WNDSAYPALBMP already defined in imgtxtio.obj
FiveH32.lib(IMGTXTIO.obj) : error LNK2005: _HB_FUN_WINDOWFROMDC already defined in imgtxtio.obj
FiveH32.lib(IMGTXTIO.obj) : error LNK2005: _HB_FUN_SELECTCLIPRGN already defined in imgtxtio.obj
FiveH32.lib(IMGTXTIO.obj) : error LNK2005: _HB_FUN_WNDREADPALBMPEX already defined in imgtxtio.obj
FiveH32.lib(IMGTXTIO.obj) : error LNK2005: _HB_FUN_ISXHBCOM already defined in imgtxtio.obj
FiveH32.lib(IMGTXTIO.obj) : error LNK2005: _HB_FUN_FW_CREATEBITMAP already defined in imgtxtio.obj
FiveH32.lib(IMGTXTIO.obj) : error LNK2005: _HB_FUN_USEGDI already defined in imgtxtio.obj
FiveH32.lib(IMGTXTIO.obj) : error LNK2005: _HB_FUN_MEMORYBUFFERTYPE already defined in imgtxtio.obj
FiveH32.lib(IMGTXTIO.obj) : error LNK2005: _HB_FUN_FW_DRAWSHAPES already defined in imgtxtio.obj
FiveH32.lib(IMGTXTIO.obj) : error LNK2005: _HB_FUN_WEBPAGECONTENTS already defined in imgtxtio.obj
   Creating library asw2016.lib and object asw2016.exp
asw2016.exe : fatal error LNK1169: one or more multiply defined symbols found

 


Note, these are errors, not warnings ...
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Folder SAY background-color is still missing ?

Postby Antonio Linares » Fri Jan 13, 2017 8:45 pm

Tim,

Please try it again using /FORCE:MULTIPLE flag when linking
regards, saludos

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

Re: Folder SAY background-color is still missing ?

Postby nageswaragunupudi » Sat Jan 14, 2017 1:17 am

Mr Uwe

the missing backgroundcolor of SAY's inside folderpages.

Yes. I understood. Thanks for clarifying.
We need to find a solution for this.

This is a reduced sample to demonstrate the issue.
Code: Select all  Expand view

#include "fivewin.ch"

function main()

   local oDlg, oFld, oSayDlg, oSayFld

   DEFINE DIALOG oDlg SIZE 300,300 PIXEL TRUEPIXEL

   @  20,20 FOLDER oFld SIZE 260,100 PIXEL OF oDlg PROMPTS "Page1"

   @  25,20 SAY "SAY ON FOLDER" SIZE 100,20 PIXEL OF oFld:aDialogs[ 1 ] ;
      COLOR CLR_HRED, CLR_YELLOW

   @ 150,40 SAY "SAY ON DIALOG" SIZE 100,20 PIXEL OF oDlg ;
      COLOR CLR_HRED, CLR_YELLOW

   ACTIVATE DIALOG oDlg CENTERED

return nil
 


Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Folder SAY background-color is still missing ?

Postby Enrico Maria Giordano » Sat Jan 14, 2017 10:20 am

And while are you there, please look at this too (btnbmp on folder is not transparent):

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oFld

    DEFINE DIALOG oDlg;
           RESOURCE "FOLDER"

    REDEFINE FOLDER oFld;
             ID 101 OF oDlg;
             PROMPTS "Test";
             DIALOGS "TEST"

    REDEFINE BTNBMP;
             ID 101 OF oFld:aDialogs[ 1 ];
             FILE "c:\fwh\bitmaps\open.bmp";
             NOBORDER

    REDEFINE BTNBMP;
             ID 102 OF oDlg;
             FILE "c:\fwh\bitmaps\open.bmp";
             NOBORDER

    REDEFINE BUTTON;
             ID 201 OF oDlg;
             ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


Code: Select all  Expand view
FOLDER DIALOG 49, 52, 365, 295
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Folder test"
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
 CONTROL "", 101, "SysTabControl32", WS_CHILD | WS_VISIBLE, 5, 5, 265, 195
 CONTROL "&Close", 201, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 275, 40, 15
 CONTROL "", 102, "TBtnBmp", WS_CHILD | WS_VISIBLE, 280, 5, 30, 25
}


TEST DIALOG 49, 52, 365, 295
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
 CONTROL "", 101, "TBtnBmp", WS_CHILD | WS_VISIBLE, 10, 10, 30, 25
}


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

Re: Folder SAY background-color is still missing ?

Postby ukoenig » Sat Jan 14, 2017 1:49 pm

Enrico,

I couldn't detect any problems with BTNBMP with my testtool.
Like You can see, it works with gradient or transparent.
The fish-resource is called from a DLL.

Image

@ 70, 100 BTNBMP oBtn OF oFld1:aDialogs[2] ;
SIZE 60, 60 PIXEL TRANSPARENT ;
NOBORDER ;
RESOURCE "FISH1" ;
ACTION ( IIF( lVisible[ 3 ] = .T., ( lVisible[ 3 ] := .F., oFld1:HideTab( 3 ) ), ;
( lVisible[ 3 ] := .T., oFld1:ShowTab( 3 ) ) ), oFld1:Refresh() ) ;
CENTER
oBtn:cTooltip := "Hide / Show TAB 3"


regards
Uwe :D
Last edited by ukoenig on Sat Jan 14, 2017 3:07 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 88 guests