Folder on gradient filled dialog

Re: Folder on gradient filled dialog

Postby RAMESHBABU » Thu Jul 09, 2009 1:52 am

Hello Peter

Please define the control like this in your RC File:

Code: Select all  Expand view

CONTROL "", 6100, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 6, 6, 423, 299

or

#include "winapi.ch"

CONTROL "", 6100, FOLDER32, 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 6, 6, 423, 299

 


Notice that "winapi.ch" is included in the second example. Because "FOLDER32" is defined in it.
If you don't include "winapi.ch" in your RC file, you will get an error.

- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 616
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Folder on gradient filled dialog

Postby PeterHarmes » Thu Jul 09, 2009 1:17 pm

Still no change i'm afraid - what about the properties of the dialog that holds the folder? Can you send me your rc?

My dialog is defined like this:

NEWCONTPRICE DIALOG 144, 126, 426, 342
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "Container Prices"
FONT 8, "MS Sans Serif"

Regards,

Pete
PeterHarmes
 
Posts: 363
Joined: Wed Feb 15, 2006 2:06 pm
Location: Oxford, England

Re: Folder on gradient filled dialog

Postby RAMESHBABU » Fri Jul 10, 2009 5:54 am

Hi,

Please look at my previous post.
My RC

Code: Select all  Expand view


MANUFACTURE DIALOG 131, 76, 345, 248
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "SMSWorld Generator"
FONT 8, "MS Sans Serif"
{
 CONTROL "", 102, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 8, 27, 329, 190
 PUSHBUTTON "&Ok", 109, 297, 227, 40, 14
 PUSHBUTTON "&Next", 103, 45, 227, 40, 14
 PUSHBUTTON "&Previous", 104, 87, 227, 40, 14
 PUSHBUTTON "&First", 105, 129, 227, 40, 14
 PUSHBUTTON "&Last", 106, 171, 227, 40, 14
 PUSHBUTTON "&Goto", 107, 213, 227, 40, 14
 PUSHBUTTON "&Generate", 108, 255, 227, 40, 14
}
 


Otherwise you can send the source to my private email. I will rectify it and send it back.

-Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 616
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Folder on gradient filled dialog

Postby dutch » Fri Jul 10, 2009 11:43 pm

Dear Rameshbabu,

I'm quite interesting SMS generator. What the way you use to send SMS (FWH or FWPPC) and how?
RAMESHBABU wrote:Hi,

Please look at my previous post.
My RC

Code: Select all  Expand view


MANUFACTURE DIALOG 131, 76, 345, 248
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "SMSWorld Generator"
FONT 8, "MS Sans Serif"
{
 CONTROL "", 102, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 8, 27, 329, 190
 PUSHBUTTON "&Ok", 109, 297, 227, 40, 14
 PUSHBUTTON "&Next", 103, 45, 227, 40, 14
 PUSHBUTTON "&Previous", 104, 87, 227, 40, 14
 PUSHBUTTON "&First", 105, 129, 227, 40, 14
 PUSHBUTTON "&Last", 106, 171, 227, 40, 14
 PUSHBUTTON "&Goto", 107, 213, 227, 40, 14
 PUSHBUTTON "&Generate", 108, 255, 227, 40, 14
}
 


Otherwise you can send the source to my private email. I will rectify it and send it back.

-Ramesh Babu P


Regards,
Dutch
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Folder on gradient filled dialog

Postby RAMESHBABU » Sat Jul 11, 2009 3:02 am

Dear Mr.Dutch

I am using a third party SDI for managing SMS.
If you need any information on that, please write to my email address.

Regards,

- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 616
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Folder on gradient filled dialog

Postby dutch » Sat Jul 11, 2009 4:25 pm

Dear Ramesh,

Yes, I love it. Could you please give me more details at dutchez4 @ gmail.com

Thanks&Regards,
Dutch
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Folder on gradient filled dialog

Postby PeterHarmes » Mon Jul 20, 2009 8:47 am

Ramesh,

I have a test app that you could look at - can you let me have your email address so i can send it to you - send your email to :

peterh at plsoft.co.uk

and i will send you the source

Many thanks

Pete
PeterHarmes
 
Posts: 363
Joined: Wed Feb 15, 2006 2:06 pm
Location: Oxford, England

Re: Folder on gradient filled dialog

Postby RAMESHBABU » Mon Jul 20, 2009 10:06 am

Hello Mr.Peter,

You can please send it to:

aksharasoft@hotmail.com

Regards

- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 616
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Folder on gradient filled dialog

Postby ukoenig » Tue Jul 21, 2009 11:33 am

I did more Tests on Dialog-Gradient and Folder.

Using the Brush-function for the transparent Say, It doesn't work on Folders.
The Gradient from the Dialog is used.

Result : Gradtest2.exe
Image

More Tests with just a normal Gradient for Dialog and Folders, the Alpha-Channel
of the Buttons is not used.

Result : GradTest1.exe
Image

Result : GradTest3.exe
( using the Brush-Function like for the Dialog, the Buttons are transparent.
but now, the Dialog uses the Folder-Color as well )
Image

I included the comlete Working-directory inside the Download.
There are 3 Exe-files, to show the different results.

Download :
http://www.pflegeplus.com/fw_download/Gradtest.zip

For different Tests, You only need to change the ACTIVATE DIALOG - Part inside the PRG.
Everything You need, is included in the ZIP-file ( Make-File, Buttons, Resource ).

The Dialog-Function I think, it is no Solution for Folders.
Dialog and Folder doesn't work together.
Maybe there is a mistake, I have done somewhere inside the Tests.

Code: Select all  Expand view


// -----  DIALOG-GRADIENT for transparent SAY  ----------
// -----  Doesn't work with Folder-Gradient
// ------------------------------------------------------
ACTIVATE DIALOG oDlg CENTERED ;
ON PAINT ( DLG_ALPHA( hDC, oBMP1 ) ) ;
ON INIT ( DLG_GRAD2( oDlg, .T. ), ;
                DLG_BAR( oDlg ), ;
        FLD_GRAD( oFld, .F. ), ;
                FLD_BAR( oFld ) )

// ----- using Normal Gradient-Function  ------
// --------------------------------------------------
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( DLG_BAR( oDlg ), ;
        FLD_BAR( oFld ) ) ;
ON PAINT ( DLG_GRAD1( oDlg, hDC, .T.), ;
                    FLD_GRAD( oFld, .F., oBMP1, oBMP2 ), ;
                    DLG_ALPHA( hDC, oBMP1 ) )


//  -------------  normal DIALOG-GRADIENT -------------------------

FUNCTION DLG_GRAD1( oDlg, hDC, lDir)

GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aDLG, lDir )

RETURN  NIL

// -------------  DIALOG-GRADIENT for transparent SAY  -------

FUNCTION DLG_GRAD2( oDlg, lDir)
local hDC, hBmp, hBmpOld, nWidth, nHeight, oBrush

IF Empty( oDlg:oBrush:hBitmap )
      nHeight := if(lDir,oDlg:nHeight,1)
      nWidth  := if(lDir,1,oDlg:nWidth)
      hDC = CreateCompatibleDC( oDlg:GetDC() )
      hBmp = CreateCompatibleBitMap( oDlg:hDC, nWidth, nHeight )
      hBmpOld = SelectObject( hDC, hBmp )
      GradientFill( hDC, 0, 0, nHeight, nWidth, aDLG,lDir )
      DeleteObject( oDlg:oBrush:hBrush )
      oDlg:oBrush:hBitmap = hBmp
      oDlg:oBrush:hBrush = CreatePatternBrush( hBmp )
      SelectObject( hDC, hBmpOld )
      oDlg:ReleaseDC()
ENDIF

RETURN NIL
 


Slowly I'm helpless. Is there any Solution to solve the Problem ?

Best Regards
Uwe :roll:
Last edited by ukoenig on Wed Jul 22, 2009 7:26 am, edited 12 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 on gradient filled dialog

Postby PeterHarmes » Tue Jul 21, 2009 11:52 am

Uwe,

Ramesh has been helping me and from what tests we have done it looks as if Rameshs solution doesnt work with the commercial xHarbour (surprise surprise) :(

Regards,

Pete
PeterHarmes
 
Posts: 363
Joined: Wed Feb 15, 2006 2:06 pm
Location: Oxford, England

Re: Folder on gradient filled dialog

Postby ukoenig » Tue Jul 21, 2009 12:20 pm

Pete,

I used Ramesh's Solution in Gradtest2.exe and it works like You can see.
As well, You can find out by Yourself, testing different combinations with the Download.
Everything You need is included. Only the Path-defines in the Batch- and Link-file, You have to change.
I used xHarbour.

The Problem : Using the Brush-function in Gradtest1.exe, destroys the Result of the Folder-Tab-Area.

Maybe the Tests can help, to solve the Problem and find out, what is wrong
or my mistake, I have done somewhere in the PRG.

Best Regards
Uwe :roll:
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 on gradient filled dialog

Postby Silvio » Fri Mar 05, 2010 6:38 pm

Uwe
I try with a dialog and Folder NO resources
It make error why ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Folder on gradient filled dialog

Postby ukoenig » Fri Mar 05, 2010 10:04 pm

Silvio,

Image

Code: Select all  Expand view


FUNCTION TEST_FOLD()
LOCAL oFolder, oSay, oRad, nValue := 1

DEFINE BRUSH oBrush

DEFINE DIALOG oDlg TITLE "FiveWin Transparent Folder-Tabs" ;
TRANSPARENT FROM 5, 5 TO 20, 50 BRUSH oBrush

@ 0.5, 1 FOLDER oFolder PROMPT "&xBase", "&And OOP", "&Power" ;
OF oDlg SIZE 160, 90

@ 1, 1 BUTTON "&Hello" OF oFolder:aDialogs[ 1 ] ;
ACTION ( oDlg:End() )

@ 3, 1 SAY oSay PROMPT "Transparent Say" OF oFolder:aDialogs[ 1 ]

@ 1, 10 RADIO oRad VAR nValue OF oFolder:aDialogs[ 1 ] ;
      ITEMS "Transparent &1", "Transparent &2", "Transparent &3" _3D SIZE 150, 15 ;
      HELPID 100, 101, 102 ;
      ON CHANGE MsgBeep()

ACTIVATE DIALOG oDlg CENTERED ;
ON PAINT ( Gradient(oDlg:hDc,{0,0,oDlg:nHeight, oDlg:nWidth}, ;
    nRgb(253,242,217), nRgb(245,204,107),.T.), ;
    SetFoldGrad( oFolder ) )

RETURN nil

// --------------------------------------------

STATIC FUNCTION SetFoldGrad( oFld )
LOCAL n, oDlg
   
FOR n = 1 to Len( oFld:aDialogs )
     oDlg = oFld:aDialogs[ n ]    
     oDlg:bPainted = { | hDC | GradientFill( hDC, 0, 0, oDlg:nHeight, ;
          oDlg:nWidth, { { 0.50, 14853684, 16314573 }, ;
          { 0.50, 16314573, 14853684 } }, .T. ) }
NEXT

RETURN NIL    
 


Best Regards
Uwe :lol:
Last edited by ukoenig on Sat Mar 06, 2010 12:00 am, 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 on gradient filled dialog

Postby Silvio » Fri Mar 05, 2010 11:41 pm

thanks now run ok
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Folder on gradient filled dialog

Postby ukoenig » Fri Mar 05, 2010 11:58 pm

Silvio,

something more :

Image

Image

Image

I tested also with Brush, but it covers the Say and Radios.
I think with < PalBmpDraw > it is also possible, to show a Background tiled.
With < PalBmpDraw > it works fine.

Image

Code: Select all  Expand view

FUNCTION TEST_FOLD()
LOCAL oFolder, oSay, oRad, nValue := 1

DEFINE BRUSH oBrush
DEFINE IMAGE oImage1 FILENAME c_path + "\System\Stone.bmp"
DEFINE IMAGE oImage2 FILENAME c_path + "\System\Xp.jpg"

DEFINE DIALOG oDlg TITLE "FiveWin Transparent Folder-Tabs" ;
TRANSPARENT FROM 5, 5 TO 20, 50 BRUSH oBrush

@ 0.5, 1 FOLDER oFolder PROMPT "&xBase", "&And OOP", "&Power" ;
OF oDlg SIZE 160, 90

@ 1, 1 BUTTON "&Exit" OF oFolder:aDialogs[ 1 ] ;
ACTION ( oDlg:End() )

@ 3, 1 SAY oSay PROMPT "Transparent Say" OF oFolder:aDialogs[ 1 ]

@ 1, 10 RADIO oRad VAR nValue OF oFolder:aDialogs[ 1 ] ;
      ITEMS "Transparent &1", "Transparent &2", "Transparent &3" _3D SIZE 150, 15 ;
      HELPID 100, 101, 102 ;
      ON CHANGE MsgBeep()

@ 3, 1 SAY oSay PROMPT "Transparent Say" OF oFolder:aDialogs[ 2 ]

@ 1, 10 RADIO oRad VAR nValue OF oFolder:aDialogs[ 2 ] ;
      ITEMS "Transparent &1", "Transparent &2", "Transparent &3" _3D SIZE 150, 15 ;
      HELPID 100, 101, 102 ;
      ON CHANGE MsgBeep()

@ 1, 15 SAY oSay PROMPT "Transparent Say" OF oFolder:aDialogs[ 3 ]

@ 1, 1 RADIO oRad VAR nValue OF oFolder:aDialogs[ 3 ] ;
      ITEMS "Transparent &1", "Transparent &2", "Transparent &3" _3D SIZE 150, 15 ;
      HELPID 100, 101, 102 ;
      ON CHANGE MsgBeep()


ACTIVATE DIALOG oDlg CENTERED ;
ON PAINT ( Gradient(oDlg:hDc,{0,0,oDlg:nHeight, oDlg:nWidth}, ;
    nRgb(253,242,217), nRgb(245,204,107),.T.), ;
    FoldBack( oFolder, oImage1, oImage2 ) )

oImage1:End()
oImage2:End()

RETURN nil

// --------------------------------------------

FUNCTION FoldBack( oFld, oImage1, oImage2 )

oFld:aDialogs[ 1 ]:bPainted = { | hDC | GradientFill( hDC, 0, 0, oFld:aDialogs[ 1 ]:nHeight, ;
       oFld:aDialogs[ 1 ]:nWidth, { { 0.50, 14853684, 16314573 }, ;
                              { 0.50, 16314573, 14853684 } }, .T. ) }

*oFld:aDialogs[ 2 ]:bPainted = { | hDC | oFld:aDialogs[ 2 ]:SetBrush( oBrush1 ) }

oFld:aDialogs[ 2 ]:bPainted = { | hDC | PalBmpDraw( hDC, 0, 0, oImage1:hBitmap, , ;
     oFld:aDialogs[ 2 ]:nWidth, oFld:aDialogs[ 2 ]:nHeight, , .T. ) }

oFld:aDialogs[ 3 ]:bPainted = { | hDC | PalBmpDraw( hDC, 0, 0, oImage2:hBitmap, , ;
     oFld:aDialogs[ 3 ]:nWidth, oFld:aDialogs[ 3 ]:nHeight, , .T. ) }

RETURN NIL
 


Best Regards
Uwe :lol:
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

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 141 guests

cron