Solved

Resize window does not work after CDialogBar created (VC++)

Posted on 2008-06-10
2
858 Views
Last Modified: 2013-12-14
Hi,

I have an application on XP.  After application started and before CDialogBar created,  the window can be resized fine.  However,  after CDialogBar is created by application,  the window can not be resized. On CDialogBar, there is a tab control (CTabCtrl) created on it.

The strange thing is, when I remotely login on the Desktop, and start the application, create CDialogBar, the window resizing works fine.  There must be something missed which caused it.
Please help!

Thanks in advance!
YP

0
Comment
Question by:ypy1632008
2 Comments
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 500 total points
ID: 21799639
CDialogBar   contains   an   embedded   member   variable   m_sizeDefault   of   type   CSize.   On   creation,   m_sizeDefault   is   set   to   the   size   of   the   dialog   template   embedded   in   the   dialog   bar.   Whenever   the   dialog   bar   is   resized   or   repositioned,   MFC   calls   CDialogBar::CalcFixedLayout().   This   member   function   is   intended   to   return   the   appropriate   size   of   the   control   bar;   for   CDialogBar,   CalcFixedLayout()   usually   returns   m_sizeDefault.   This   causes   the   dialog   bar   to   always   snap   back   to   its   default   size.

Following KB article may be of yours use :
How to make a resizable dialog bar in Microsoft Foundation Classes (MFC)
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q143255& <======

-Mahesh
0
 

Author Closing Comment

by:ypy1632008
ID: 31465931
Thanks!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

746 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

12 Experts available now in Live!

Get 1:1 Help Now