Solved

Resizing docked CDialogBar

Posted on 2009-06-28
5
1,469 Views
Last Modified: 2013-11-20
Hi,

I am trying to create resizable CDialogBar which is in docked state. I managed to resize it while it is floating, but i don't want that bar to be floating, only docked and I want to resize it.

Thanks already
0
Comment
Question by:talgraf1
  • 2
  • 2
5 Comments
 
LVL 19

Expert Comment

by:alb66
ID: 24733990
Give a look at this good project:

"CSizingControlBar - a resizable control bar"
at
http://www.codeproject.com/KB/toolbars/sizecbar.aspx
0
 

Author Comment

by:talgraf1
ID: 24734228
I inherited a class from CSizingControlBar, but I can't just throw my dialog in it. Also I cannot resize docked bar which was intended.
0
 
LVL 31

Accepted Solution

by:
Zoppo earned 250 total points
ID: 24734907
Hi talgraf1,

to change the size of a CDialogBar (which is calculated from it's underlaying dialog-resource) you can override CControlBar::CalcFixedLayout in your CDialogBar derived class. This sample i.e. just adds 150 pixels to the width of the dialog-bar:

/*virtual*/ CSize
CTestDlgBar::CalcFixedLayout( BOOL bStretch, BOOL bHorz )
{
      CSize s = CDialogBar::CalcFixedLayout( bStretch, bHorz );

      s.cx += 150;

      return s;
}

Hope that helps,

ZOPPO
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 24902508
Hi talgraf1,

did you have any problems with the solution I gave? Didn't it work for you? Or is there any other reason why you accepted it with a 'B'-grade?

ZOPPO
0
 

Author Comment

by:talgraf1
ID: 24968958
Hi Zoppo

I used your solution and noticed that dialogbar was not that I needed -> ran to a dead end. But thanks anyway.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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 …
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.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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.

863 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

16 Experts available now in Live!

Get 1:1 Help Now