Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

help ! vc++ adding winsock control to existing project

$
0
0

hello dear forum

I have an existing VC++ 2008 project named MOCON

I add a form MOCON1.h to this project 

and added a winsock control to this form

all in the namespace MOCON

-------------------------------

namespace MOCON {

public:
MOCON(void)
{
InitializeComponent();

void InitializeComponent(void)

this->axWinsock1->Enabled = true;
this->axWinsock1->Location = System::Drawing::Point(165, 124);
this->axWinsock1->Name = L"axWinsock1";
this->axWinsock1->OcxState = (cli::safe_cast<System::Windows::Forms::AxHost::State^  >(resources->GetObject(L"axWinsock1.OcxState")));
this->axWinsock1->Size = System::Drawing::Size(28, 28);
this->axWinsock1->TabIndex = 0;

------------------------

this above code is added automatically to MOCON1.h  - it named the control    axWinsock1 

now in another cpp file I include below code 

----------------------------

#include "MOCON1.h"

sprintf(buffer,MOCON::axWinsock1->LocalIP);

---------------------------

but in the above line when I type MOCON:: it deosnet automatically finds axWinsock1

------------------------------

1>.\MyHardware.cpp(66) : error C2039: 'axWinsock1' : isnot a member of 'MOCON'

1>.\MyHardware.cpp(66) : error C2065: 'axWinsock1' : undeclared identifier
------------------------------------

and when I compile project I get this above errors - what can I do ?

thanks


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>