DanB
2013-02-07 19:45:35 UTC
Maybe someone has seen this before and just knows, I can't figure it so far.
So I have a class derived from CFrameWnd
class HERichFrame : public CFrameWnd
And then in a test app I derive like:
class CMainFrame : public HERichFrame
I want HERichFrame to handle certain things internally. So it has:
ON_MESSAGE( ID_VIEWSCROLL, OnViewScroll )
afx_msg LRESULT OnViewScroll( WPARAM par, LPARAM );
.cpp
LRESULT HERichFrame::OnViewScroll( WPARAM param, LPARAM )
{
return FALSE;
}
but OnViewScroll never gets called. Yet I can add the exact same handler
to CMainFrame and it does get called, so it should not be about my
handler or ID.
ON_MESSAGE( ID_VIEWSCROLL, OnViewScroll )
afx_msg LRESULT OnViewScroll( WPARAM par, LPARAM );
.cpp
LRESULT CMainFrame::OnViewScroll( WPARAM param, LPARAM )
{
return FALSE;
}
The call is from the child view.
GetParent( )->SendMessage( ID_VIEWSCROLL, nPos );
Baffled, Best, Dan.
So I have a class derived from CFrameWnd
class HERichFrame : public CFrameWnd
And then in a test app I derive like:
class CMainFrame : public HERichFrame
I want HERichFrame to handle certain things internally. So it has:
ON_MESSAGE( ID_VIEWSCROLL, OnViewScroll )
afx_msg LRESULT OnViewScroll( WPARAM par, LPARAM );
.cpp
LRESULT HERichFrame::OnViewScroll( WPARAM param, LPARAM )
{
return FALSE;
}
but OnViewScroll never gets called. Yet I can add the exact same handler
to CMainFrame and it does get called, so it should not be about my
handler or ID.
ON_MESSAGE( ID_VIEWSCROLL, OnViewScroll )
afx_msg LRESULT OnViewScroll( WPARAM par, LPARAM );
.cpp
LRESULT CMainFrame::OnViewScroll( WPARAM param, LPARAM )
{
return FALSE;
}
The call is from the child view.
GetParent( )->SendMessage( ID_VIEWSCROLL, nPos );
Baffled, Best, Dan.