How to paint a "highlight frame" (2) ?

How to paint a "highlight frame" (2) ?

Post by blueturtl » Thu, 06 May 2004 20:58:47


Hi,
I'm working on some kind of a "form editor".

When a user selects a control ( by a mouse click ), I want it to look
like VC6 MFC \ VS .Net :

A "highlight frame" should be drawn around the selected control.

If 2 windowed controls (e.g. buttons) intersect, and one of them is
selected,
the "highlight frame" should be drawn above both of them.
E.g:
button 1 is above button 2.
button 2 is selected.
the "highlight frame" is seen also on button 1.
This how it looks in VS.

-------------------------
| |
| ######################################
| button 1 # | button 2, under button 1 #
| above button 2 ######################################
| |
-------------------------


My problem is - how to do it ?
I doubt if they repeat the painting in each DC.
I guess there is a simple way to do it.

Thanks for any help.

Dave.
 
 
 

How to paint a "highlight frame" (2) ?

Post by Christian » Sat, 08 May 2004 14:51:04

Dave a rit:


See "DlgEdit" source code from MSDN