Detailed Description
- See also:
- Class ICUIFrame, Class CUIFrameMgr, Class CUIPosData, Class ICustomControl.
- Description:
- This class provides a way for messages received by a
CUIFrame to be processed in a context-specific
fashion.
Since the CUI Frame is just a window, it needs a window proc. There
is one built into the CUI system, but it may need additional
information that is specific to how the frame is being used. For
example, in 3ds Max the command panel can't be resized horizontally
and the default window proc can't manage this.
For such situations, the application must install a CUIFrameMsgHandler
object. You establish that this is the handler for the frame using
the method ICUIFrame::InstallMsgHandler(CUIFrameMsgHandler
*msgHandler).
These message handlers have one significant class method:
ProcessMessage(). If
ProcessMessage() returns TRUE, then the CUI system assumes
that the message is completely handled. If it returns FALSE, then
the standard CUI processing takes place. (Note that the message
handler may still return FALSE, even if it does some
processing...).
There is a special message (CUI_POSDATA_MSG) that is sent by
the CUI system to the message handler to get information on window
size constraints, etc. An example of processing this message is
shown below. In this case editPosData is a static instance
of CUIPosData. That object has
GetWidth() and GetHeight() methods which return the
proper width and height size for various orientations. See Class
CUIPosData for
details.
case CUI_POSDATA_MSG: {
CUIPosData **cpd = (CUIPosData **)lParam;
cpd[0] = &editPosData;
}
return TRUE;
#include <custcont.h>
List of all
members.
Constructor & Destructor Documentation
Member Function Documentation
virtual int ProcessMessage |
( |
UINT |
message, |
|
|
WPARAM |
wParam, |
|
|
LPARAM |
lParam |
|
) |
|
[inline, virtual] |
- Parameters:
-
message |
Specifies the message. |
wParam |
Specifies additional message information. The contents of this
parameter depend on the value of the message parameter. |
lParam |
Specifies additional message information. The contents of this
parameter depend on the value of the message parameter. |
- Default Implementation:
- { return FALSE; }
CUIFrameMsgHandler CUIFrameMsgHandler
CUIFrameMsgHandler CUIFrameMsgHandler CUIFrameMsgHandler
CUIFrameMsgHandler CUIFrameMsgHandler CUIFrameMsgHandler
CUIFrameMsgHandler CUIFrameMsgHandler
CUIFrameMsgHandler CUIFrameMsgHandler
CUIFrameMsgHandler CUIFrameMsgHandler CUIFrameMsgHandler
CUIFrameMsgHandler CUIFrameMsgHandler CUIFrameMsgHandler
CUIFrameMsgHandler CUIFrameMsgHandler