?
Solved

Resizing docked CDialogBar

Posted on 2009-06-28
5
Medium Priority
?
1,511 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
[X]
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
  • 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 750 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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 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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

741 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