?
Solved

restricting a picture's size in a dialog

Posted on 1998-09-06
3
Medium Priority
?
242 Views
Last Modified: 2013-11-20
Using : NT 4.0, VC++ 5.0.

Hi all,
I have a dialog box which displays a frame of a .avi (for example) . My problem is that AVI files are in different frame size, so my picture is sometimes huge and sometimes  very small...
How can I restrict a pictures size in a dialog box, so it won't cover other dialog controls?

Thanks a lot..
Hilit
0
Comment
Question by:hilit
[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
3 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 1321774
What control are you using to display the picture in the dialog box?
0
 
LVL 1

Author Comment

by:hilit
ID: 1321775
It's a picture control, type frame.
Thanks!
0
 

Accepted Solution

by:
klingej earned 120 total points
ID: 1321776
I am displaying bitmaps in a dialog using a picture control, type rectangle, and code something like this:

RECT rectDest, rectParent;
CWnd *pwnd=GetDlgItem(IDC_PICTURE_CONTROL);

if(pwnd) {
                  pwnd->GetWindowRect(&rectDest);
GetWindowRect(&rectParent);
rectDest.left -= rectParent.left;
rectDest.right -= rectParent.left;
rectDest.top -= rectParent.top;
rectDest.bottom -= rectParent.top;

}

and then display the picture in the rectDest.

Could this help
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses

752 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