Solved

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

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

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
string initialization in java 11 117
Convert money to nchar 4 72
Angular JS Route 3 98
Support for Notepad++ (including downloading & installing a plugin) 5 191
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
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.

685 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