Solved

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

Posted on 2008-06-10
2
860 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sumNumber challenge 16 122
Doc'in system (example?) BA 7 110
haveThree challenge 22 118
EvenOdd challenge 10 108
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seveā€¦
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

773 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