I built a server using MFC, and had to get the foundation going by using examples online. The OnReceieve(port), is a function that I created in my CDialog class.
((serverDlg*)m_pDlg) is the part I don't get. This line of code is in a function in my socket class, and I am able to call a function that is declared in my CDialog class(OnReceieve(port)). serverDlg is the name of my CDialog class and m_pDlg is a pointer to a CDialog object if that helps. Thanks.