Solved

Resizing a dialog & its controls

Posted on 2002-04-09
3
500 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
[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
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Title # Comments Views Activity
Windows Drag & Drop Location 2 117
Change owner from userA to server Local Administrators 7 74
How to convert MFC::CString to UTF8 wchar_t* 10 459
Problem to event 3 123
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

739 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