how do i access the message loop from mfc?

Started by
2 comments, last by thuned 22 years, 8 months ago
i''m using some code (directshow) that sends its own unique events to the message loop, so those don''t show up in the classwizard thing. is there a way so i can directly access the loop? i just started learning mfc so i don''t know these stuff. and yes, i''ve already ordered a book, i''m just waiting for it to come.
life is unfair, take advantage of it.UNMB2 - if the link doesn't work, try clicking it :)
Advertisement
You can tell MFC to call a function when a particular message comes flinging through the pump:

In the .cpp file there''s a section something like this, in grey text:

BEGIN_MESSAGE_MAP(CMyDlg, CDialog)
//{{AFX_MSG_MAP(CSpectrumAnalyzerDlg)
ON_BN_CLICKED(IDC_BUTTON_ARM, OnButtonArm)
ON_BN_CLICKED(IDC_BUTTON_START, OnButtonStart)
ON_BN_CLICKED(IDC_BUTTON_STOP, OnButtonStop)
//Add this to it
ON_MESSAGE(WM_MessageICareAbout, MyMethodToHandleIt)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

And declare and define a method to handle the message
LRESULT CMyDlg::MyMethodToHandleIt(WPARAM wParam, LPARAM lParam)

Magmai Kai Holmlor
- Not For Rent
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
thanks!
life is unfair, take advantage of it.UNMB2 - if the link doesn't work, try clicking it :)
Listen, this is very very important. MFC SUCKS!!! Goto: http://www.wxWindows.org, and it will change your life forever...trust me on this one.

"Journies Lead to Knowledge and Passion Lights the Way..."

~=NeuroMorphus=~
"Journies Lead to Knowledge and Passion Lights the Way..."~=NeuroMorphus=~

This topic is closed to new replies.

Advertisement