Solved

restricting a picture's size in a dialog

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

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

Suggested Solutions

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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 a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

726 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