You can include any GDI+ object from inside a Title-function.
It will be shown together with the TTitle and destroyed,if hiding the title
It belongs to the MAINWINDOW ( doesn't cover a TTitle and NOT painted on top of a TTitle)
It gives You the possibility, to show some extra effects.
Code: Select all
// -----------------
FUNCTION RESULTS(oTitle3,oTitleFont)
LOCAL oImg
LOCAL hDC := oWndMain:GetDC()
LOCAL oGraphics := Graphics():New( hDC )
// nTransparency, nRed, nGreen, nBlue
LOCAL oPen := Pen():New( 255, 0, 0, 255 )
// Brush-Object -> nTransparency, nRed, nGreen, nBlue
LOCAL oBrush := Brush():NewSolidBrush( 150, 0, 255, 0 )
DEFINE IMAGE oImg FILENAME c_path1 + "Exit.bmp"
oTitle3:Show()
@ 15, 15 TITLETEXT OF oTitle3 TEXT "Results" FONT oTitleFont 3d
oTitle3:nShadowTxtClr := 65535
oTitle3:nShadowTxtDis := 10 // Shadow Text Distance
@ 55, 45 TITLETEXT OF oTitle3 TEXT "1" COLOR 16777088 FONT oTitleFont
@ 80, 45 TITLETEXT OF oTitle3 TEXT "2" COLOR 255 FONT oTitleFont
@ 105, 45 TITLETEXT OF oTitle3 TEXT "3" COLOR 65280 FONT oTitleFont
@ 130, 25 TITLEIMG OF oTitle3 BITMAP c_path1 + "Exit.bmp" SIZE 50, 50 ;
TRANSPARENT ANIMA ACTION ( oGraphics:destroy(), oTitle3:Hide(), oWndMain:Refresh() )
// oPen, [oBrush], nLeft, nTop, nWidth, nHight
oPen:SetInset( )
oGraphics:DrawRect( oPen, oBrush , 400, 550, 300, 100 )
DELETEDC( hDC )
Box-drawing
// Left, Top, Right, Bottom. Radius1, Radius2, Color, Pen
//oTitle3:bPainted := < |hDC|
//RoundBox( hDC, 5, 5, 110, 205, 10, 10, 255, 5 )
//RETURN NIL
//>
RETURN NIL
Uwe