Solved

Resizing a dialog & its controls

Posted on 2002-04-09
3
496 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
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 44

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 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