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

x
?
Solved

How to make the controls fit to Scrren?

Posted on 2008-06-13
3
Medium Priority
?
332 Views
Last Modified: 2013-11-20
Question:
I have developed a Simple Dialog Based Application in that dialog i have two controls(OK and cancel),when i try to maximum the dialog into full screen the controls are not fitting to the screen coordinates.The position of the controls is same as when the dialog was minimizes.How can i make to fit to screen?
0
Comment
Question by:Rajeshm8484
[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
  • 2
3 Comments
 
LVL 46

Expert Comment

by:Kent Olsen
ID: 21778020
Hi Rajeshm8484,

Create an OnResize() event handler for the Dialog.

Within the handler, set the desired position of the controls.

When the window maximizes or returns to normal, or when it's resized by dragging a corner/edge the handler will be executed allowing you to move the controls as appropriate.


Good Luck,
Kent
0
 

Author Comment

by:Rajeshm8484
ID: 21778104
How can i get the exact position of controls where to place,when i maximize or minimize?
0
 

Accepted Solution

by:
Rajeshm8484 earned 0 total points
ID: 21836131
In the attached file list,Interface.txt is the Interface file(i.e.h extension file) and Implementation.txt is the  Implementation file (i.e .cpp extension file) for SizingDialog class.SizingDailog class is derived from CDialog..The dialog in which the controls have to be fitted to screen when maximized or minimized , derive that dialog class from SizingDialog(i.e replace ur Dialog class from SizingDialog everywhere)...In the InitInstance() function of ur dialog call

//////////////For Resizing
       this->AddResizaleCtrl(NULL);

       this->SendMessage(WM_SIZE);

Thanks and Regards,
Rajes.M
Implementation.txt
Interface.txt
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
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