I want to set the height and the width of the dockable panes. I tried passing the value in the CRect parameter to the OnCreate function but that didnt work. can anybody help in resolving this
Asked
Active
Viewed 489 times
1 Answers
0
You can probably get the effect you want by calling SetWindowPos(... SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE)
, this will work in the case the pane is undocked.
I don't know if the result will constructive at all when the pane is docked or hidden. You can also add handlers for WM_SIZING and WM_SIZE in your CDockablePane derived class to limit the size of the pane within a desired range.
MFC manages the pane sizes and uses values stored in the registry. That is a real pain, especially when a pane disappears in a new version of your software. I don't know of an easy way to turn this off. But it can be done.

Michaël Roy
- 6,338
- 1
- 15
- 19