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
yoavoAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Vinayak KumbarConnect With a Mentor Sr Program ManagerCommented:
Hi,

By default, the dialog bar will not resize. If u set that property in the resource editor for that dialog bar, then only user is allowed to resize it. Whay can't u do one thing. Just create one more dialog bar. dont go to the properties of it. And create and see. It will not be resizable.
Try it out.

VinExpert
0
 
inprasCommented:
Hi

Map WM_MINMAXINFO

and return the same structure recived

Hope this helps
0
 
bhatCommented:
Hi

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


I think this will change it.

0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
yoavoAuthor Commented:
no, I did not set the border property as resize.
0
 
Vinayak KumbarSr Program ManagerCommented:
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
0
 
Vinayak KumbarSr Program ManagerCommented:
Hi,

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

VinExpert

0
 
bhatCommented:
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.
0
 
yoavoAuthor Commented:
I want my bar to be docked, but I dont want to allow the user to resize it by dragging the border.
0
 
eknguyenCommented:
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
0
 
eknguyenCommented:
Hi,
Since CBRS_SIZE_FIXED is not an extended style so you can create the dialog bar with Create(...) function.

ly nguyen
0
 
hiap_hoCommented:
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.
0
All Courses

From novice to tech pro — start learning today.