keyongtech


  keyongtech > vc.* > vc.mfc > 07/2008

 #1  
05-15-08, 06:44 PM
Timothy Dean
When I use the app wizard in VS 2005 to create a simple SDI application
(change view to be a CFormView), the scrollbars on the form view don't seem
to paint properly. As you resize the main window, the scrollbars will flash
and initially paint with the XP theme and then repaint with the classic
view. Any ideas? Thanks.

Timothy Dean
 #2  
05-15-08, 06:57 PM
Tom Serface
I've never seen this happen. Did you do something to resize the view in an
OnSize routine or are you running under Vista?

Tom

"Timothy Dean" <my_email> wrote in message
news:1316
[..]
 #3  
05-15-08, 08:20 PM
Timothy Dean
I am running under XP. We have duplicated this on several XP machines.
Some generated their own apps with VS 2005, some just ran a version from my
machine. I have not added anything to the OnSize event. I simply generate
an MFC SDI app and change the views base class from CView to CFormView.
When the main frame is manually sized small enough to show the scrollbars,
the behavior is visible. Once the "classic view" scrollbars are visible, if
you click on the up or down arrow, the slider and up or down arrow button
are repainted as XP theme. Clicking the other arrow will also repaint it to
XP style. Resize the window again and they "flash" eventually going back to
"classic".

Timothy Dean


"Tom Serface" <tom.nospam> wrote in message
news:cf94
[..]
 #4  
05-15-08, 09:59 PM
Seetharam
You are not alone :-)

Here's a link to the solution:
http://typedef.org/jcopenha/2005/06/..._on_cformview/

-SM
 #5  
05-16-08, 05:26 PM
AliR \(VC++ MVP\)
I have seen this, I don't think there is a cure.

AliR.


"Timothy Dean" <my_email> wrote in message
news:1316
[..]
 #6  
05-16-08, 05:31 PM
AliR \(VC++ MVP\)
I see Seetharam posted a solution. I'm now using the solution in my app
also. ;)

AliR.

"AliR (VC++ MVP)" <AliR> wrote in message
news:4805
[..]
 #7  
07-24-08, 03:53 AM
Sibzor
Thankyou!!!! :D I had this problem and it took me ages to find this solution.
I was searching google for things like Double Scrollbar and MFC Overdrawing
Scrollbar and finding nothing, then eventually I added CFormView and found
this :D thanks again!

By the way, in case that website link should change or dissapear in the
future, I will post the solution here:
Go into resource editer and set the Vertical Scrollbar and/or Horizontal
Scrollbar to 'true' for your form.
Similar Threads
Printed size of screen captures from MS Paint and from Paint Shop Pro.

I am trying to understand the printing of screen captures of forms. I put a button on my form and use printform. The printed image is 6 inches wide. It is also 6 inches wide...

Unable to paint (using paint() in JPanel) inside mouse listeners

[ this post is equal to [..] This is hard to explain but I'll do my best :) I've created a little game and at some point I needed to make images "move" on the JPanel...

GDI+ Paint over children controls such as button as well as non-client scrollbar

I am trying to paint in a custom control "OnPaint" but can not paint over the child controls such as a button or listview. I also want to be able to paint in the "Bounds"...

How to avoid default paint opeartion to draw custom paint

Hi Friends, I inherited .NET window control to draw custom look. I override Windproof function to draw custom look. But default paint operation perform first & then custom...

Detecting scrollbar click on CScrollView scrollbar

I have a CScrollView derived view in an MFC application, and I want to detect when the user clicks on the right scrolling button of the scrollbar (not the mouse). I need to...


All times are GMT. The time now is 11:09 PM. | Privacy Policy