B
Bev Kaufman
I am still learning InfoPath, and have been going through the lab exercises
to be found at this site:
http://msdn2.microsoft.com/en-us/library/Aa167916(office.11).aspx.
Lab 6 is how to create an ActiveX control to be use in an InfoPath form. I
am seriously handicapped in that it requires an understanding of C#, while my
background is in VB. But I plowed ahead, following each instruction
precisely. And I got 5 errors to try to figure out.
I will list just the first one:
c:\Programs\ActiveX\SampleControl.h(33): error C2864: 'm_nCurrentValue' :
only const static integral data members can be initialized inside a class or
struct
Here is line 33:
long m_nCurrentValue;
Here are the instructions that put it there:
1. We need to keep track of the current count. We begin by creating a
variable which stores the running total. Locate the class definition (in the
SampleControl.h file) and after the opening curly brace({) and the public
declaration, add:
long m_nCurrentValue;
2. Also, we should initialize it to zero, so within the class constructor,
add:
m_nCurrentValue=0;
So, here is the class declaration:
class ATL_NO_VTABLE CSampleControl :
And here is the first curly brace, followed by public:
{
public:
long m_nCurrentValue;
m_nCurrentValue=0;
And I put my code immediately after, just like the instructions said.
Obviously the code doesn't go where I was told to put it, but I can't figure
out where. Does anyone know what's wrong with this?
to be found at this site:
http://msdn2.microsoft.com/en-us/library/Aa167916(office.11).aspx.
Lab 6 is how to create an ActiveX control to be use in an InfoPath form. I
am seriously handicapped in that it requires an understanding of C#, while my
background is in VB. But I plowed ahead, following each instruction
precisely. And I got 5 errors to try to figure out.
I will list just the first one:
c:\Programs\ActiveX\SampleControl.h(33): error C2864: 'm_nCurrentValue' :
only const static integral data members can be initialized inside a class or
struct
Here is line 33:
long m_nCurrentValue;
Here are the instructions that put it there:
1. We need to keep track of the current count. We begin by creating a
variable which stores the running total. Locate the class definition (in the
SampleControl.h file) and after the opening curly brace({) and the public
declaration, add:
long m_nCurrentValue;
2. Also, we should initialize it to zero, so within the class constructor,
add:
m_nCurrentValue=0;
So, here is the class declaration:
class ATL_NO_VTABLE CSampleControl :
And here is the first curly brace, followed by public:
{
public:
long m_nCurrentValue;
m_nCurrentValue=0;
And I put my code immediately after, just like the instructions said.
Obviously the code doesn't go where I was told to put it, but I can't figure
out where. Does anyone know what's wrong with this?