Advertisement
7_2009-2012 Graphics #227449

FYI: Shaped Focus 'Rect'

Ability to use shapes for a focus "rectangle". The DrawFocusRect API only draws rectangles, but what if you want some other shape? Well, this example can show you how. Also included is an example on how to dictate the color of the rectangle drawn by DrawFocusRect API and also how to draw a custom focus rect in the XOR fashion. BTW I don't really like the quality of the shaped focus. Drawing every other pixel on a shape looks pretty poor in my opinion. Thought I could use this but, oh well. I offer it to you should you care to use it, modify it, or find a way to make it better. For shaped regions, maybe a blended/soft solid shape would serve better and certainly would look better. One thing I did learn, was how to create an XOR-like brush and use it to paint something & then remove the painted something; so not all is lost :)

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Upload
Original Comments (3)
Recovered from Wayback Machine