Using CDoc variable in MainFrm
-
Hi I have trouble using CDoc variable in MainFrm. I have included Cdoc.h in MainFrm but the error of undeclared variable still existed.
CDoc& pDoc = GetDocument();
ASSERT_VALID(pDoc);This is how I normally getting CDoc variable from CView but it doesnt work in MainFrm. Please advise. THanks.
-
Hi I have trouble using CDoc variable in MainFrm. I have included Cdoc.h in MainFrm but the error of undeclared variable still existed.
CDoc& pDoc = GetDocument();
ASSERT_VALID(pDoc);This is how I normally getting CDoc variable from CView but it doesnt work in MainFrm. Please advise. THanks.
I think there is a GetActiveDocument(). If not that, then use GetActiveFrame(), from there you get the view of the frame and from that the document of the view. Its a bit long winded. If you vote me down, my score will only get lower
-
I think there is a GetActiveDocument(). If not that, then use GetActiveFrame(), from there you get the view of the frame and from that the document of the view. Its a bit long winded. If you vote me down, my score will only get lower
-
I think there is a GetActiveDocument(). If not that, then use GetActiveFrame(), from there you get the view of the frame and from that the document of the view. Its a bit long winded. If you vote me down, my score will only get lower