Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Resizing docked CDialogBar

Posted on 2009-06-28
5
1,481 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how do i create updater to My Activex application? 3 94
wait notify demo infinite loop 3 121
wordcount challenge 11 132
Problem to App source 6 70
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

808 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