today I started with FWH 9.07.
I tested the Vtitle-Class.
Is it possible, to add Radio and Checkbox as well like Say and Buttons ?
It works without problems, but I couldn't get it transparent.
Using oTitle:lTransparent := .T., the Title is transparent.
Radio and Checkbox is transparent, but with the Dialog-Gradient.
The Radio and Checkbox belongs to the Dialog. I think, it doesn't work this way,
to get the Gradient-Color from the Title.
- Code: Select all Expand view
#include "fivewin.ch"
#include "ttitle.ch"
Function main()
local oDlg, oTitle, oChk, oRadio
lChk := .F.
nValue := 1
aDLG := { { 0.60, 16752190, 16777215 }, ;
{ 0.60, 16777215, 16752190 } }
DEFINE DIALOG oDlg FROM 5, 5 TO 30, 80 TITLE "A Dialog Box"
@ 30, 15 TITLE oTitle size 250, 100 of oDlg SHADOW BOTTOMLEFT SHADOWSIZE 2
oTitle:aGrdBack := { { 1, 8553215, 16777215 } }
// Transparent Title
* oTitle:lTransparent := .T.
@ 4.2, 10 CHECKBOX oChk VAR lChk OF oDlg
oChk:lTransparent := .T.
@ 3.5, 20 RADIO oRadio VAR nValue OF oDlg ;
ITEMS "&One", "&Two", "T&hree" _3D SIZE 100, 16 ;
HELPID 100, 101, 102 ;
ON CHANGE MsgBeep()
oTitle:nShadowIntensity = 70
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT DLG_GRAD( oDlg, .T. )
RETURN NIL
// ------------- DIALOG-GRADIENT -------
FUNCTION DLG_GRAD( 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
Best Regards
Uwe :