Solved

restricting a picture's size in a dialog

Posted on 1998-09-06
3
232 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
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 60 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand to include initial dialog with two choices. 9 78
VBA "SendKeys" Syntax for Multiple Keystrokes 7 108
sumHeights2  challenge 7 103
Problem to event 3 96
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 …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

773 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