So much in there ...

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Tom
Posts: 1176
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

So much in there ...

#1 Post by Tom »

I was looking for a simple method to draw a colored box around some objects in a few dialogs, and I played around with the SUBCLASS clause, which works fine, but caused a bigger code review (besides, painting text statics with gradient backgrounds and stuff like this based on the DCSAY/DCSTATIC-commands is really simple with this!). Anyway, I remembered the HILITEGETS clause of DCGET OPTIONS, which almost does exactly this: painting a colored frame around objects. So, I looked through Roger's code and found the (not documented) function DC_HiliteGets(). Painting a blue frame around a text static works this way:

Code: Select all

DC_HiliteGets(oStatic,1,GRA_CLR_BLUE)
Just add it to the EVAL clause of the object - or somewhere else.

This is no magic and nothing changing the world. I frequently look through Roger's code and find that kind of functions. What I want to say is: If you try to do something - take a look at the eXpress++-source first. You may find out that Roger already did this. ;)
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: So much in there ...

#2 Post by rdonnay »

Tom -

The HILITEGETS clause of DCGETOPTIONS uses this function, but it never occurred to me to document the function.
Maybe I'll do that.

Roger
The eXpress train is coming - and it has more cars.

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: So much in there ...

#3 Post by Cliff Wiernik »

Also, Roger added the ability to override this function with a set/get function so it uses your own code. With visual style enable, the undrawing of the hilite left a light image trace remaining because it used a solid color instead of restoring the underlying image used in the visual style.

Cliff

Post Reply