Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Resizing a dialog & its controls

Posted on 2002-04-09
3
Medium Priority
?
508 Views
Last Modified: 2013-11-20
I have a dialog app which resizes some controls if the user drags the dlg or uses the min/max button on the title bar, but I don't know how to get the notification when the user double-clicks on the title bar.


Here's the msg handlers I have:

   MyDlg::OnSizing( UINT nSide, LPRECT lpRect )
   {
      // Resize edit controls
   }

   MyDlg::OnSysCommand(UINT nID, LPARAM lParam)
   {
      // Check for SC_MAXIMIZE or SC_MINIMIZE
      // and resize edit controls
   }


Also when the main dlg is resized, the edit boxes flash when they get resized. Is there a way to prevent this?
Thanks,
grailman
0
Comment
Question by:Grailman
3 Comments
 
LVL 37

Accepted Solution

by:
zzynx earned 300 total points
ID: 6930541
I think double-clicking the title bar is the same as maximizing.

Maybe the following can interest you:
http://www.codeproject.com/dialog/layoutmgr.asp
(93 users gave the article a grand total of 4.85/5)
With a few lines of extra code your dialogs and others
become sizable. I use it with pleasure, even in a commercial product.

Bye.

0
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 6931423
To prevent flashing try

LockWindowUpdate();

< resize >

UnlockWindowUpdate();
0
 
LVL 1

Author Comment

by:Grailman
ID: 6945206
That gave me just what I wanted.

Thanks.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses

885 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