FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour 小hange the color of a window fragment
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
小hange the color of a window fragment
Posted: Sat Dec 24, 2022 07:22 AM

Hi,

I need to change the color of a rectangular window fragment. How can this be done ?

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: 小hange the color of a window fragment
Posted: Sat Dec 24, 2022 07:54 AM

Please post a screenshot of what you need

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: 小hange the color of a window fragment
Posted: Sat Dec 24, 2022 10:56 AM
An orange rectangle is drawn on the white window

https://cloud.mail.ru/public/kdYk/61wg63nfX
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: 小hange the color of a window fragment
Posted: Sat Dec 24, 2022 11:17 AM
Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

聽 聽 local oWnd, oBrush

聽 聽 DEFINE BRUSH oBrush COLOR 0x00A5FF

聽 聽 DEFINE WINDOW oWnd 

聽 聽 ACTIVATE WINDOW oWnd ;
聽 聽 聽 聽 ON PAINT FillRect( hDC, { 80, 80, 200, 200 }, oBrush:hBrush )

聽 聽 RELEASE BRUSH oBrush

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: 小hange the color of a window fragment
Posted: Sat Dec 24, 2022 01:09 PM

Thank you, this is what you need

Continue the discussion