WINAPI Method
I'm wondering if anyone can advise me on how to overcome a problem i'm having.
I have got a program which calls a dll, this dll consists of callback functions(external functions). These functions return a continuos stream of data(which is fine). My problem is that i want to output this data in a list box which i created in "Form1". I cant figure out how to do this because these functions seem to be external to the rest of my code (so basically i need these functions to recognise either the methods i've created in Form1.cpp or get it to recognise the listbox in Form1. The supplier of the dll sent me the following code:
void WINAPI PriceUpdate(PriceUpdStructPtr data)
{
int nRow=-1;
PriceStruct newPrice;
CListBox *pListBox=NULL;
pListBox=(CListBox*)AfxGetApp()->m_pMainWnd->GetDlgItem(IDC_LIST2);
CString CDisplyString;
cDisplayString.Format("Price Update callbacl Exchange=%s ", data->ExchangeName);
nRow=pListBox->AddStirng(cDisplayString);
pListBox->SelectString(nRow-1, cDisplayString);
}
However i cannot use this code because my form was not create with MFC, I've used the toolbox in Microsoft visual C++.
Thanks in advance for your suggestions.

