A simple VC++ MFC quiz! - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

A simple VC++ MFC quiz!

In Win32 you use a specific function that checks the WM_xxx messages,

(I don't remember the syntax)
int CALLBACK WinProc( MSG msg, ....)
{
swith(msg)
case WM_CHAR
etc.
}

hope you understand it!

but how does it works in VC++6 and ofcourse then I mean in MFC.

Help me!


Comments

  • dalaptopdalaptop Posts: 90Member
    If what you mean is that you want MFC to handle your messages, then you need to setup message handlers. In your header file, declare: DECLARE_MESSAGE_MAP() and make sure it is protected in your class. then in your cpp file, include:

    BEGIN_MESSAGE_MAP()
    ON_MESSAGE(WM_MYMESSAGE, MyMessage())
    END_MESSAGE_MAP()

    this will execute MyMessage(), everytime a WM_MYMESSAGE is received by the window. I hope this is what your wondering. Any questions, email me: [email protected]

    ~Andrew


Sign In or Register to comment.