RoundRect

RoundRect

Postby lailton.webmaster » Fri Sep 11, 2009 5:13 am

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

thanks

( I wan´t to use in fwh902 ) :o
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Re: RoundRect

Postby Enrico Maria Giordano » Fri Sep 11, 2009 8:46 am

This is a working sample:

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: RoundRect

Postby lailton.webmaster » Fri Sep 11, 2009 9:44 am

perfect thanks
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 76 guests