ATL/COM MFC API problem

M

Michael Lyszczek

Hi, I am new to this group and looking for some help.

I am writing an MFC app that is having issues outputting data to a
list box on the MFC dialog.

Currently, you start the program, it will run CTradeDlg::InitDialog();
where most of the program is taken care of. It will do API calls to a
data provider, which provide historical data, push it into a list, but
when I have to do the COM/ATL interface to retrieve realtime data I
had to declare a class within the main cpp file called

class CMyFrameSink : public CComObjectRoot, public IMafFrameEvents

the problem is this....

if I try to output data fromt CMyFrameSink::, it will not output it
even if I declare a CTradeDlg object within that class, and have an
output function

void CTradeDlg::OutputToListBox()
{

nRow=((CListBox*)GetDlgItem(IDC_LIST1))->AddString("test");

}

just to test if it will acutally output, but no success.
Also, after I declare the CTradeDlg object and do a "CTradeDlgObj." a
list box will come up with all class members and methods, so I really
don't know what the problem is.


I am using VC6 and does anyone have any guidance? It would be very
much appreciated.

Michael Lyszczek
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top