-
October 12th, 2011, 04:34 PM
#1
Picture Control - I need scrollbars!
Hey everyone,
I am using MFC and have a Picture Control on my dialog. I display picture in it - but the problem is the Picture Control resizes all over my dialog! Of course I want the image only to be within my predefined border and it should have scrollbars to scroll through it.
I read all links from google's 1st page on "MFC picture control scrollbars" but nonetheless couldn't solve my issue. I found a reference to CScrollView though and someone said I should use that. But I am not sure how I could make a new Picture Control using that? Should I make new class and put it on my form programatically?
-
October 13th, 2011, 02:49 AM
#2
Re: Picture Control - I need scrollbars!
That's it, a Windows static (picture) control is designed to be very simple and does'n support scroll capabilities.
However, you can do it yourself: derive from CStatic MFC class, then implement scrolling.
About CScrollView: a view is designed to sit in a frame, in a SDI/MDI framework. Although it is not impossible to place it in a dialog (as you are doing with a control), this is not a good idea.
So, if you want an image with scroll in a dialog window, first option is better.
-
October 20th, 2011, 02:34 AM
#3
Re: Picture Control - I need scrollbars!
Maybe this thread can put you on the right track.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|