windows default border color RRS feed

  • Question

  • I have created a datetimepicker that will accept a blank value as null.  I was having some problems with the display.  When a user clicked into it when it was null, you couldn't tell that the focus was there.  I overrode the WndProc and used

    WM_NCPAINT to color the border of the datetimepicker when the user enters and leaves the control.  This all works fine, except if the user has a special color scheme.  Then, my control has a different color border than all the others.  My question is, is there any way to get the default border color for a control when it is loaded?  That would allow me to set that color in my control and the swap between that and the selected color.  If that isn't possible, how would I go about changing the background color?  Thanks in advance.

    Tuesday, June 24, 2008 7:22 PM