FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour RoundRect
Posts: 603
Joined: Sun May 04, 2008 08:44 PM
RoundRect
Posted: Fri Sep 11, 2009 05:13 AM

How change color created in RoundRect ( That is BLACK ) to other color ?

thanks

( I wan´t to use in fwh902 ) :o

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: RoundRect
Posted: Fri Sep 11, 2009 08:46 AM
This is a working sample:

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    DEFINE DIALOG oDlg

    ACTIVATE DIALOG oDlg;
             ON PAINT DRAWBOX( oDlg, hDC, 10, 10, 100, 100, CLR_HRED );
             CENTER

    RETURN NIL


STATIC FUNCTION DRAWBOX( oDlg, hDC, nTop, nLeft, nBottom, nRight, nColor )

    LOCAL hPen := CREATEPEN( PS_SOLID, 1, nColor )

    LOCAL hOldPen := SELECTOBJECT( hDC, hPen )

    ROUNDRECT( hDC, nTop, nLeft, nBottom, nRight, 20, 20 )

    SELECTOBJECT( hDC, hOldPen )

    DELETEOBJECT( hPen )

    RETURN NIL


EMG
Posts: 603
Joined: Sun May 04, 2008 08:44 PM
Re: RoundRect
Posted: Fri Sep 11, 2009 09:44 AM

perfect thanks

Continue the discussion