Сhange the color of a window fragment

Сhange the color of a window fragment

Postby Natter » Sat Dec 24, 2022 7:22 am

Hi,

I need to change the color of a rectangular window fragment. How can this be done ?
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Сhange the color of a window fragment

Postby Antonio Linares » Sat Dec 24, 2022 7:54 am

Please post a screenshot of what you need
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41321
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Сhange the color of a window fragment

Postby Natter » Sat Dec 24, 2022 10:56 am

An orange rectangle is drawn on the white window

https://cloud.mail.ru/public/kdYk/61wg63nfX
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Сhange the color of a window fragment

Postby Antonio Linares » Sat Dec 24, 2022 11:17 am

Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 41321
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Сhange the color of a window fragment

Postby Natter » Sat Dec 24, 2022 1:09 pm

Thank you, this is what you need
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 11 guests