Solved

Resizing a dialog & its controls

Posted on 2002-04-09
3
489 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 100 total points
Comment Utility
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 44

Expert Comment

by:AndyAinscow
Comment Utility
To prevent flashing try

LockWindowUpdate();

< resize >

UnlockWindowUpdate();
0
 
LVL 1

Author Comment

by:Grailman
Comment Utility
That gave me just what I wanted.

Thanks.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
if loop in java 3 113
ShiftLeft challenge 21 64
changeXy challenge 13 55
mapAB Challlenge 35 83
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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 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 discusses moving either the default database or any database to a new volume.

728 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

9 Experts available now in Live!

Get 1:1 Help Now