Solved

How to make the controls fit to Scrren?

Posted on 2008-06-13
3
316 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
  • 2
3 Comments
 
LVL 45

Expert Comment

by:Kdo
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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…
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 learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

757 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

18 Experts available now in Live!

Get 1:1 Help Now