Home > Software engineering >  How to pull litre CDockablePanel don't let lift to a certain size
How to pull litre CDockablePanel don't let lift to a certain size

Time:10-09

MFC is a DOC in VIEW of the structure of the program (of which the VIEW is inherited CFormView) inside the mainFrame has a CDockablePane under (in), pull CDockablePanel CFromView will appear in the process of more and more small, how to guarantee the minimum size of the FormView? Don't let CDockablePane pull litre

CodePudding user response:

WM_GETMINMAXINFO
The WM_GETMINMAXINFO message is sent to a window when The size or The position of The window is about to change. An application can use this message to override The window 's default maximized The size and position, or its default minimum or maximum tracking The size.

WM_GETMINMAXINFO
Lpmmi=(lParam LPMINMAXINFO);//address of structure

The Parameters
Lpmmi
Value of lParam. Pointer to a MINMAXINFO structure that contains the default maximized the position and dimensions, and the default minimum and maximum tracking sizes. An application can override the defaults by setting the members of this structure.
The Return Values
If an application the processes this message, it should return zero.

Few
The maximum tracking The size is The largest window size that can be produced by using The borders to size The window. The minimum tracking The size is The smallest window size that can be produced by using The borders to size The window.

QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winuser. H.

See Also
Windows, the Overview Window Messages, MoveWindow SetWindowPos, MINMAXINFO


CodePudding user response:

That need not docked modes, and with the floating mode,

CodePudding user response:

@ 4 teacher zhao WM_GETMINMAXINFO still won't do, CDockablePane still can drag

CodePudding user response:

reference zl80568947 reply: 3/f
@ 4 teacher zhao WM_GETMINMAXINFO still won't do, CDockablePane still can drag

Not to,
Helpless, and the other please brillant,

CodePudding user response:

@ syy64 floating dock and use, there is no other way in the process of CDockable drag WM_MOUSEMOVE are unable to response

CodePudding user response:

@ 4 zhao teacher ok or appreciate,

CodePudding user response:

Rewrite the virtual function
Virtual BOOL IsResizable (const)
{
return FALSE;
}

CodePudding user response:

@ VisualEleven has tried

CodePudding user response:

CDockablePane: : IsResizable ()


By default, dockable panes are the resizable. To prevent resizing, override this method in a derived class and return FALSE. Note that a FALSE value leads To a failed ASSERT in CPane: : DockPane. Use CDockingManager: : AddPane home To dock a pane within a parent frame.

Panes that always be resized can neither complete nor enter auto - hide mode and are always located at the outer edge of the parent frame.
  • Related