[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Sizing a child/view...

Posted on 1997-05-01
7
Medium Priority
?
229 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 80 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

650 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