Click to See Complete Forum and Search --> : Active Document Server HELP!


BrucePataki
July 24th, 2005, 06:53 AM
I am using MFC Application wizard provided with VC++.Net to generate an application with DocView Support. I have selected Full Server i.e. Active document server and Active Document container.

I want to separate the view class and data class. I.e I want a form to take input and then after processing the data the data should show up in a separate form. I am unable to include view class files in any of the other class files. When I do so I face errors as listed below.

Basically I want to call the view class methods from other class. So for doing that I included the view class file in the other class but it gives me the following errors.
Please help and send me some tips if you can.


------ Build started: Project: TEST, Configuration: Debug Win32 ------

Compiling...
TESTDM.cpp
e:\Data\TEST\projects\TEST\TEST\TestModule.h(15) : error C2065: 'IDD_DIALOG1' : undeclared identifier
e:\Data\TEST\projects\TEST\TEST\TESTView.h(17) : error C2065: 'IDD_TEST_FORM' : undeclared identifier
e:\Data\TEST\projects\TEST\TEST\TESTView.h(21) : error C2143: syntax error : missing ';' before '*'
e:\Data\TEST\projects\TEST\TEST\TESTView.h(21) : error C2501: 'CTESTView::CTESTDoc' : missing storage-class or type specifiers
e:\Data\TEST\projects\TEST\TEST\TESTView.h(21) : error C2501: 'CTESTView::GetDocument' : missing storage-class or type specifiers
e:\Data\TEST\projects\TEST\TEST\TESTView.h(21) : warning C4183: 'GetDocument': missing return type; assumed to be a member function returning 'int'

Build log was saved at "file://e:\Data\Test\projects\Test\Test\Debug\BuildLog.htm"
TEST - 5 error(s), 1 warning(s)

stober
July 24th, 2005, 09:06 AM
include resource.h at top of testdm.cpp, but after stdafx.h

Andreas Masur
July 24th, 2005, 05:35 PM
[ Merged threads ]

BrucePataki
July 25th, 2005, 10:51 AM
Thanks Stober. It fixed my compilation problems.

Running the application where we feed the data from one window and display in another window having list view control - I notice that data is correctly passed on for display in view class. However, I tried to create a list view control pointer like this:

CListCTRL* pList = (CListCTRL *) GetDlgItem (IDC_List1);

which in turn gives me runtime error in winocc.cpp that debug assertion failed at line 94:

Line 94 in winocc.cpp is
ASSERT(::IsWindow(m_hWnd));

If you know how to fix this problem or have any tips, I would surely appreciate.

Bruce