- Scrollbar Painting bug
- Posted by PPC on August 3rd, 2004
Hi,
I've a Win32 app created using VC++ and MFC running on Windows XP.
On one of the forms(CFormView derived), I have a scrollbar control.
If I click on the down arrow of the scrollbar( and keep it pressed ),
then i get the required messages ( in OnVScroll - LineDown ),
but the painting of the 'Down Arrow' goes for a toss !
it becomes all gray ( entire 'down arrow' rectangle becomes gray ).
it paints the 'down arrow' rectangle normally only when i release the
mouse button.
But till the time the mouse button is pressed, it just can not paint
the down arrow rectangle properly :-(
I tried all stunts like calling InvalidateRect for the control,
UpdateWindow etc. from within OnVScroll() but no luck.
and the interesting part is, 'up arrow' does not give any problem !
Please help,
Cheers,
Viv
- Posted by Severian on August 3rd, 2004
On 3 Aug 2004 06:18:01 -0700, vkolekar@yahoo.com (PPC) wrote:
Two thinks I know of that will mess with scrollbar painting:
1) SetCapture() during processing of the scroll messages.
2) Pumping messages during processing of a scroll message.
HTH
--
Sev
- Posted by ab on August 4th, 2004
vkolekar@yahoo.com (PPC) wrote:
The behaviour you see could be screen driver specific.
- Posted by ab on August 4th, 2004
vkolekar@yahoo.com (PPC) wrote:
Have your tried the code on another computer?
- Posted by PPC on August 5th, 2004
I don't think it's display driver specific.
I tried pumping messages also (PeekMessage - TranslateMessage -
DispatchMessage) from the OnVScroll function, but still no luck.
It just does not draw the down arrow image till i release mouse.
This problem is driving me nuts :-(