Link to home
Start Free TrialLog in
Avatar of yoavo
yoavo

asked on

prevent sizing a CDialogBar.

hi,
I have a CDialogBar in my application.
I dont want the user to resize it by dragging its border.
how do I do that ??

10x,
--Yoav
Avatar of inpras
inpras

Hi

Map WM_MINMAXINFO

and return the same structure recived

Hope this helps
Hi

If U have Set the   border property as Resize,
Remove it.


I think this will change it.

Avatar of yoavo

ASKER

no, I did not set the border property as resize.
Hi,

U dont want ot resize or dont want to dock it?. If U have not set it as Resizing, U can't resize it by default.

VinExpert
Hi,

Pls put the code which u r using to create the bar and after that, what all u r doing...

VinExpert

Hi

If u don't want docking remove the docking property
by

m_wndMyDialogBar.EnableDocking(0);
If U are Using  
DockControlBar(&m_wndMyDialogBar);
comment  this line.
Avatar of yoavo

ASKER

I want my bar to be docked, but I dont want to allow the user to resize it by dragging the border.
ASKER CERTIFIED SOLUTION
Avatar of Vinayak Kumbar
Vinayak Kumbar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,
 When you create your dialog bar, use
CreateEx(...) function and make sure set
style to CBRS_SIZE_FIXED
for example

if (!m_myDlgBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_FIXED) || !m_myDlgBar.LoadToolBar(IDR_MAINFRAME))
       {
            TRACE0("Failed to create dialog bar\n");
            return -1;      // fail to create
      }

ly nguyen
Hi,
Since CBRS_SIZE_FIXED is not an extended style so you can create the dialog bar with Create(...) function.

ly nguyen
You'll get more assistance if we know what exactly are you doing with the CDialogBar property the setting and everything. Hope you won't mind posting the complete source code. Or if you don't mind I can send you the source code that will give you a dialogbar that didn't resize in couple of days. I'm not at my room now and don't have any developer tools here.