Sizing a child/view...

I have an application, where the view contains visual representations of amplitudes of samples.  When I cut and paste varying numbers of these samples to a "NEW" document/view, I need to resize the child/view to be smaller - specifically, the number of samples copied.  What's the best way to do this?
skinkAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mbhaktaCommented:
Your statement doesnot seem that clear. Can you clearly say what you are looking for? Are you planning to tile all your views ? Are you having a MDI / SDI , splitter application ? Do you want your mainframe to resize as well ?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
skinkAuthor Commented:
I'm sorry, I thought it was quite clear.  I want to resize my child window/view it contains.  That's it.  What do tiling, splitter windows, MDI/SDI have to do with it?
0
mbhaktaCommented:
I will have to repeat my question in again. What are these 'visual represe..... samples' ? Are they bitmaps, metafiles, text i/o etc. Also for your information resizing of views work differently for MDI's and SDI's. Please explain your objective/s properly, and u might someday find a quicker answer (we have already wasted 2 discussions).
0
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

skinkAuthor Commented:
Again I apologize.  A sample is a numerical representation of an electronic signal (an integer or other type) which I represent in my View class visually.  I load a binary file of samples (quite similar to a .WAV file actually) and display the samples, with the ability to scroll through the file.  I am using a CView derivative, though, not a CScrollView derivative.  My application is MDI.
0
mbhaktaCommented:
Firstly, why are you not using a CScrollView derived class. Most of the scrolling headache is taken care by CScrollView for you. Now to your problem. Maybe, before you display the graphics inside the view you should calculate the size of the image yourselves. Convert the width to window co-ordinates, inform your view about the size of the bitmap SetWindowPos(), and use the generic calls ResizeParentToFit() etc. to get the complete image on the view.
0
skinkAuthor Commented:
I was warned against using a CScrollView because of the size of my scrolling area - it was about a year ago so I don't remember the details.  But at any rate, the view class works fine.  So I would prefer not  to change CView to a CScrollView derivative unless I have to.  ResizeParentToFit() is a CScrollView member isn't it?  Is there anything similar for CView or should I roll my own?
0
skinkAuthor Commented:
I resolved the issue by copying some of the code from the MFC source for CScrollView::ResizeParentToFit().  Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.