-
June 5th, 2012, 09:00 AM
#12
Re: Pass a vector from a pushbutton in dialog class to ONDRAW () in the view.cpp
Originally Posted by GCDEF
You're not listening to the advice being offered. That tends to stop the help from coming.
As mentioned, data belongs in the document class.
Your dialog needs access to your view so it can invalidate it. I told you a couple of ways to set that up.
In OnDraw, call GetDocument() to get the data from the document object.
If you're going to ask for help, you should listen to it.
Code:
void CContourPlotView::OnDraw(CDC* pDC)
{
CContourPlotDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
This code is already writeen. The variable i ha used for 2D vector is vec.
when i use vec in ONDRAW(). it shows undeclared identifier
I have attached the complete set of codes above in the discussion i had written in ONPLOT() in the contourplotdlg.cpp which is dialog
Please have a look at it..
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|