
CButton - change background color problem
You don't need to override every single control, there are always some
walkarounds. For instance, you could trap WM_LBUTTONDOWN in
PreTranslateMessage, you could avoid subclassing controls with MFC classes
and use GetDlgItem instead etc.
I don't think it's am only root of all UI bugs, there are other bugs for
this. ;)
As to service pack, this is not possible since MFC library (release version
of it) is part of Pocket PC platform and is supplied with all devices (in
device ROM). So patching eVC will not help at all. As to fixing this bug in
future versions of MFC, I doubt that this will happen. The bug we are
discussing may in fact be a feature. ;-)
--
Sincerely,
Alexander
http://www.RSDN.ru - Russian Software Developer Network
Quote:
> Thanks,
> When are Microsoft going to issue a service pack for EVC 3.0? the
> notification bug is causing me to have to override practcally every
control,
> and seems to be the root of all ui bugs.
> Thanks
> Roger Womack
> > I think these article will help you:
> > http://www.pocketpcdn.com/articles/mfcbuttonbug.html
> > --
> > Sincerely,
> > Alexander
> > http://www.RSDN.ru - Russian Software Developer Network
> > > I've (almost) successfully managed to change the background colour of
a
> > > CButton, using the ON_WM_CTLCOLOR_REFLECT as is normal practice for
> > CStatic,
> > > I'm also overriding ON_WMLBUTTONDOWN, ON_WMSETFOCUS and
ON_WM_KILLFOCUS,
> > so
> > > that I can have a highlighted and unhighlighted button background
color.
> > > If I define 2 of these on a dialog if I tap on 1 it changes color
> > correctly,
> > > and the tap on button 2, button 1 changes back to the unhighlight
> > background
> > > color, but if instead, I hold the stylus down on button 2 then button1
> > > remains in the highlighted state. Anyone any ideas?
> > > Thanks
> > > Roger