Alright, so I tried to use AfxGetMainWnd() from inside a
CScrollView-derived class to access a function inside of a
CMDIFrameWnd-derived class. It worked under the "Debug" configuration,
but I'm getting a nasty error under the "Release" configuration:
Coil error LNK2019: unresolved external symbol "public: void __thiscall
CMainFrame::setCurrRef(class ATL::CStringT<char,class
StrTraitMFC<char,class ATL::ChTraitsCRT<char> > >)"
(?setCurrRef@CMainFrame@@QAEXV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z)
referenced in function "protected: void __thiscall
CCoilView::OnEditRefrigerantselection(void)"
(?OnEditRefrigerantselection@CCoilView@@IAEXXZ)
So I've decided to do it using another method: by sending a message to
the application from within the CScrollView-derived class and handling
it from within the CMDIFrameWnd-derived class. However, I've made my
own custom messages; I've just handled the ones the application
generates for selecting different menu options, etc. So, how do I
make, send, receive, and act on custom messages? Thanks.