FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Rounded Buttons in FWH 9.12
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Rounded Buttons in FWH 9.12
Posted: Sun Dec 06, 2009 11:51 AM
FWH 9.12 provides support for Ronded Buttons using Class TBtnBmp:
Code (fw): Select all Collapse
    @ 5, 10 BTNBMP oBtn OF oWnd  ;
       SIZE 60, 70 ;
       PROMPT cVer FILE "..\BITMAPS\sms.bmp" 2007 ;                
       FONT oFont BOTTOM ;
       ACTION MsgInfo("Hello") 

    oBtn:lEllipse = .T.




regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Rounded Buttons in FWH 9.12
Posted: Sun Dec 06, 2009 12:15 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Rounded Buttons in FWH 9.12
Posted: Sun Dec 06, 2009 03:16 PM

Great! Only a note: I don't like that tiny border very much. Can you try to improve its look a little?

EMG

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Rounded Buttons in FWH 9.12
Posted: Sun Dec 06, 2009 03:45 PM
Maybe to draw a Circle with a defined Pen and Color ?



After Updating to FWH 9.12, I can add this Option to the Buttontools.
Is there as Solution for my Transparent-Button-Problem on Image-background as well ?



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.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Rounded Buttons in FWH 9.12
Posted: Sun Dec 06, 2009 07:57 PM

Enrico, Uwe,

We use Windows standard function Ellipse() to paint that tiny border, and its the way Windows paint it, certainly not very good...

If we could find a way to paint a better Ellipse...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: Rounded Buttons in FWH 9.12
Posted: Mon Dec 07, 2009 10:28 AM

Antonio, using the extended functions (antialiasing, etc.) from GDI+ to reach a better graphic?

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Rounded Buttons in FWH 9.12
Posted: Mon Dec 07, 2009 10:45 AM

Günther,

We need to find how to use GDI+ from C or C++, as we can not use .NET from C/C++ code.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Rounded Buttons in FWH 9.12
Posted: Mon Dec 07, 2009 12:02 PM
Here we have an example of using GDI+ from C++:
Code (fw): Select all Collapse
HDC          hdc;
PAINTSTRUCT  ps;
Pen*         myPen;
Graphics*    myGraphics;

hdc = BeginPaint(hWnd, &ps);
   myPen = new Pen(Color(255, 255, 0, 0), 3);
   myGraphics = new Graphics(hdc);
   myGraphics->DrawLine(myPen, 20, 10, 200, 100);
   delete myGraphics;
   delete myPen;
EndPaint(hWnd, &ps);

Now we need to find what header files to use and what libraries to link
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion