Solved

Sizing a child/view...

Posted on 1997-05-01
7
222 Views
Last Modified: 2013-11-20
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?
0
Comment
Question by:skink
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 4

Accepted Solution

by:
mbhakta earned 40 total points
ID: 1301273
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
 

Author Comment

by:skink
ID: 1301274
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
 
LVL 4

Expert Comment

by:mbhakta
ID: 1301275
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:skink
ID: 1301276
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
 
LVL 4

Expert Comment

by:mbhakta
ID: 1301277
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
 

Author Comment

by:skink
ID: 1301278
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
 

Author Comment

by:skink
ID: 1301279
I resolved the issue by copying some of the code from the MFC source for CScrollView::ResizeParentToFit().  Thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question