Solved

restricting a picture's size in a dialog

Posted on 1998-09-06
3
225 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
3 Comments
 
LVL 23

Expert Comment

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

Author Comment

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

Accepted Solution

by:
klingej earned 60 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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 seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now