Back to Amir Israeli Homepage

[CLimitWndSize : Limit window sizes and positions ]

This article was contributed by Amir Israeli Amir Israeli.
Amir Israeli Web Site

Environment: Win 95 + NT4 SP3

CLimitWndSize is a very simple hook : part of the hook framework. it allows you to add a mechanism to any CWnd derived class , that controls the sizes of that window.
This class hooks only 1 message : WM_GETMINMAXINFO. to know more about this message : read its' documentation within MSDN.

Few functions participate in the whole game of programming:
These 2 functions set/unset hook during runtime, or get state of hook. If you set hook and current window size and placement doen't match available sizes , the hook sizes the window and repositions it in proper place.

	BOOL EnableLimit(CWnd *pWnd,BOOL bEnable);
	BOOL IsEnabled() { return m_bEnable; }

Move to downloads downloads

History

Date Posted: February 26, 2001

Home  |  Links  |  About