CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010
    Posts
    31

    Question Pretranslate message and winproc

    what are common for pretranslatemessage and winproc functions and how are they different ?

    Thank you

  2. #2
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: Pretranslate message and winproc

    The WindowProc is a heart if any windows application
    It is application defined for processing desired messages.
    WindowProc is called by the system directly delivering all messages as a result of the SendMessage call or delivering messages from a message queue that were placed there as a result of the PostMessage call.

    The PreTranslateMessage is MFC specific and is implemented as a virtual member of CWinThread, CWinApp and CWnd. There is no PreTranslateMessage in pure Win32 API based application.
    It is used in CWinThread/App to allow application translate windows message (mainly acceleration keys) before they reach Window TranslateMessage API that is called from a main message loop to translate virtual keys messages and before messages are dispatched to a WindowProc.
    Last edited by JohnCz; August 20th, 2010 at 08:45 AM. Reason: Spelling
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured