MessageWindow.WndProc Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Process Windows-based messages.
Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)
Parameters
- m
- Type: Microsoft.WindowsCE.Forms.Message%
A Windows-based message.
vb#c#
The following code example is an override of the WndProc method in a class derived from MessageWindow. It examines incoming Windows-based messages. If a message has the identifier WM_CUSTOMMSG, it calls the RespondToMessage callback function providing information obtained from the WParam and LParam parts of the message. This code example is part of a larger example provided for the MessageWindow class.
// Override the default WndProc behavior to examine messages. protected override void WndProc(ref Message msg) { switch(msg.Msg) { // If message is of interest, invoke the method on the form that // functions as a callback to perform actions in response to the message. case WM_CUSTOMMSG: this.msgform.RespondToMessage((int)msg.WParam, (int)msg.LParam); break; } // Call the base WndProc method // to process any messages not handled. base.WndProc(ref msg); } }
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.