PDA

Click to See Complete Forum and Search --> : Frustrated/Confused


Technocrat
Dec 8th, 2000, 03:33 PM
Ok I have A MFC Program, frmView, that has a edit box that I need to update with data from a different class. So I created a function in the Main Form class that takes in the string and updates the data.

void CQueryDlg::PushText(CString inTxt)
{

m_out = inTxt;
UpdateDate(false);

}

There is more in this function but this is part I am having a problem with. Now I have another class that takes in the data, and it needs to send it to PushText.

if I use:
QueryDlg::PushText();
in my second class I get:
C:\Program Files\Microsoft Visual Studio\MyProjects\Query\Controller.cpp(258) : error C2352: 'CQueryDlg::PushText' : illegal call of non-static member function

Ok I am not sure why. So I made PushText a static function, but then I could not access m_out or UpdateData. It would give the same error but for those.

Any Help???
Thanks