Problem with CToolBar and XP
-
Hello, I have started a MFC project in Visual C++ .NET 2002, over Windows 2000. I wanted to use the new XP controls, so I left checked this option in the wizard, and everything was right until I used a wrapper class for CToolBar, this class override the function OnEraseBkgnd() and put a bitmap image as background. Under W2000 works, but under XP the Toolbar appear unchanged, as if the WM_ERASEBKGND message wasn't processed. Can anyone help? If it can't be solved, Does anyone know how can I remove the XP controls from the project?. Thanks.
-
Hello, I have started a MFC project in Visual C++ .NET 2002, over Windows 2000. I wanted to use the new XP controls, so I left checked this option in the wizard, and everything was right until I used a wrapper class for CToolBar, this class override the function OnEraseBkgnd() and put a bitmap image as background. Under W2000 works, but under XP the Toolbar appear unchanged, as if the WM_ERASEBKGND message wasn't processed. Can anyone help? If it can't be solved, Does anyone know how can I remove the XP controls from the project?. Thanks.
I've have the same problem with dialogboxes; you erase the background your way and windows ignores that and does it its way. A solution I do not like, but works every time: Do your drawing in the OnDraw() or OnPaint(). The problem here is that you may (or may not) see it flicker, since the drawing is actualy being done twice. Good luck! Signed: John R. Shaw