{
//TODO: add in this dedicated code and/or call the base class
Cstrings Buffer=_T (" ");
TCHAR TBuffer [4096]={0};
If (nErrorCode==0)
{
M_bConnected=TRUE;
CChessHigherApp * (CChessHigherApp *) AfxGetApp ();
PApp CMainFrame * pFrame=(CMainFrame *) - & gt; M_pMainWnd;
PDlg DNetWorkChess *=(DNetWorkChess *) pFrame - & gt; The GetActiveWindow ();
Memcpy (m_szBuffer, "connect to", 13);
Strcat_s (m_szBuffer, "123");
PDlg - & gt; M_inet=1000;
M_szBuffer MultiByteToWideChar (0, 0, 1, TBuffer, 4069);
Buffer. The Format (_T (" % d "), pDlg - & gt; M_inet);
AfxMessageBox (Buffer, MB_OK, 0);
Memset (m_szBuffer, 0, sizeof (m_szBuffer));
AsyncSelect (FD_READ);
}
CAsyncSocket: : OnConnect (nErrorCode);
}
Red is the code I wrote, but can't see the Numbers and changes in the dialog box, estimated Pointers have got the wrong number,
CodePudding user response:
CodePudding user response:
The HWND HWND=: : FindWindow (NULL, _T (" dialog box under the network of "));DNetWorkChess * pDlg=(DNetWorkChess *) FromHandle (hWnd) (SOCKET);
Tried this, but also not line