PreTranslateMessage and .NET

L

Luis F. Rodas

Dear All,

Does anybody know if exist functions in C# equivalent to PreTranslateMessage
(MFC) ?

Best regards,
Luis F.
(Indusoft Team)
 
A

Ashot Geodakov

protected override WndProc( ref Message m )
{
// Do whatever here...

base.WndProc( ref m ); // May or may not need this call.

// ...or here.
}
 
J

Jeffrey Tan[MSFT]

Hi Luis,

Yes, normally I agree with Ashot that .Net Winform's WndProc provided a
good place to do some filter/preprocessing for some windows messages. You
may override the control you wanted to customize and override this WndProc
method.

Additionally, .Net Winform control also provided some other methods may be
useful to preprocess messages or keyboard events, such as
ProcessKeyPreview, ProcessKeyMessage, ProcessKeyEventArgs,
ProcessDialogKey, PreProcessMessage, ProcessCmdKey etc.... Many of them are
overridable in child class. Currently, there is no detailed document
regarding which method should be used yet, it may depend on the specific
requirement and scenario.

Anyway, if you have any specific problem of customizing a control, please
feel free to post, we may give it a discuss. Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top