Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Resizing a dialog & its controls

Posted on 2002-04-09
3
Medium Priority
?
505 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 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 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

730 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