Originally posted by: Mark Zarzour
Are these mode shapes?
ReplyOriginally posted by: Jeet Sukumaran
Hi!
I cannot compile any project incorporating this (fantastic) control.
I am using VC5.0, and keep getting
error C2678:
binary '<' : no operator defined which takes a left-hand operand of type 'const struct SSinglePoint' (or there is no acceptable conversion)
The error occurs in the "XUtility" file, located in my DevStudio \VC\Include subdirectory.
This file is called by "grwnd.cpp" and "pview.cpp". I suspect the problem lies not so much in the control code, as much as in the project configurations that I have set up.
What do I need to change?
Thanks for any help you can throw my way.
Reply
Originally posted by: Ludovic Charrier
So I had two solutions :
So I add the virtual methods to both classes CGraphContainer and CPointsView
BOOL CGraphContainer::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
BOOL CPointsView::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
It works perfectly, and it is enough for my use.
The problem was to receive command message from menu or else
in the view issued from the template doc/view.
My document is used for other things (threads ...)
So I went deep in the source (MFC also), and see that when a command message is send :
-first go to mainframe
-second the mainframe get the active view, and in this case : it was either CGraphContainer or CPointsView who got the active characteristic.
- Set the active view to CGrafixView at the beginning of the program (I do not know consequences on the further message routing )
- Reverse the message routing to the mother view with methods inside work Paul Barvinko.
{
CWnd* pView = GetMainGraphView();
if (pView != NULL && pView->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
return true;
return CScrollView::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
{
CWnd* pView = GetMainGraphView();
if (pView != NULL && pView->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
return true;
return CFormView::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
And in the mother class CGrafixView (in the sample):
BOOL CGrafixView::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
//CCmdTarget is very important : it is the core of message routing
//do not call the base class CGraphView => infinite loop
return CCmdTarget::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo) ;
}
Thanks to Paul Barvinko.
Originally posted by: Dennis Palazzo
if (cx==0 && cy==0) return;
in the routine:
void CGraphSplitter::OnSize(UINT nType, int cx, int cy)
right after the line:
CSplitterWnd::OnSize(nType, cx, cy);
and now it works great!
Nice program, but after compiling the app it crashes upon
start-up. To fix this, I inserted the following line: