cannot access protected member declared in class 'CTestDlg'该如何解决

cannot access protected member declared in class 'CTestDlg'
class CTestDlg : public CDialog
{
// Construction
public:
CTestDlg(CWnd* pParent = NULL); // standard constructor

// Dialog Data
//{{AFX_DATA(CTestDlg)
enum { IDD = IDD_TEST_DIALOG };
CListBox m_list3;
CListBox m_list2;
//}}AFX_DATA

// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTestDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
void OnSocketReceive(CDataSocket *pSocket, CMessg & msg);
void OnSocketClose(CDataSocket *pSocket);
void ExitChat();
void GetErrorReason(int nErrorCode);
void RefreshScreen();

UINT m_ListenPort;

CString m_ChatWords;
BOOL m_bActive;


在TestDlg.cpp中
ULONG WINAPI ListenThread(LPVOID p)
{
CString buffer;
CWnd *subWnd;



CSocket listenSocket;
BOOL bRet;
CTestDlg *pDlg=(CTestDlg *)p;
CSocket dataSocket;
SOCKET acceptSock;
//create a tcp/stream based socket

bRet=listenSocket.Create(pDlg->m_ListenPort);


return 0;
}

编程时出现如下错误:
\Test\TestDlg.cpp(225) : error C2248: 'm_ListenPort' : cannot access protected member declared in class 'CTestDlg'
\test\testdlg.h(43) : see declaration of 'm_ListenPort'
------解决思路----------------------
\Test\TestDlg.cpp(225) : error C2248: 'm_ListenPort' : cannot access protected member declared in class 'CTestDlg'
 \test\testdlg.h(43) : see declaration of 'm_ListenPort' 
不是很清楚吗,不能访问保护成员
public:
UINT m_ListenPort;