Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Resizing docked CDialogBar

Posted on 2009-06-28
5
Medium Priority
?
1,521 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

618 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