Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 867
  • Last Modified:

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

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
ypy1632008
Asked:
ypy1632008
1 Solution
 
mahesh1402Commented:
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
 
ypy1632008Author Commented:
Thanks!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now