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
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
Hi
If U have Set the border property as Resize,
Remove it.
I think this will change it.
If U have Set the border property as Resize,
Remove it.
I think this will change it.
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
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
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.EnableDoc king(0);
If U are Using
DockControlBar(&m_wndMyDia logBar);
comment this line.
If u don't want docking remove the docking property
by
m_wndMyDialogBar.EnableDoc
If U are Using
DockControlBar(&m_wndMyDia
comment this line.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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(ID R_MAINFRAM E))
{
TRACE0("Failed to create dialog bar\n");
return -1; // fail to create
}
ly nguyen
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
{
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
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.
Map WM_MINMAXINFO
and return the same structure recived
Hope this helps