tags:

views:

355

answers:

3

Is there any way to remove the dotted line rectangle, which indicates the keyboard focus, on a Win32 common control, without owner draw or subclass them?

It seems that under WPF one can control the visual style of the focus rectangle, but I failed to find corresponding API on a Win32 common control.

A: 

I don't believe there is a simple style that allows you to turn off the focus rect on a list view control. The only way I've ever seen it done is with an owner draw control. I know this is not the answer you were looking for, but there are examples of owner draw controls that do this available... just so you don't have to do all the work. :)

Kevin
A: 

Dare I say it, but there seems to be something on the Site of Satan that has an example of this:

http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_20281441.html

(you have to scroll to the bottom to see it)

Dave Markle
A: 

You can send it the WM_CHANGEUISTATE message or subclass it and fake the parameters in response to WM_UPDATEUISTATE

w0lo