by Anon » Wed, 24 Sep 2003 14:45:37
In the following code my edit box which is supposed to display an IP
address always displays the number "4". I can't figure out why it
won't work. Any suggestions are more than welcome.
void CIPGetAddressDlg::OnRunme()
{
// TODO: Add your control notification handler code here
DWORD DwordAddress=0;
char CharAddress[100];
CIPAddressCtrl *ipaddressctrl = (CIPAddressCtrl *)
GetDlgItem(IDC_IPADDRESSCTRL);
CEdit *edit = (CEdit *) GetDlgItem(IDC_EDIT);
DwordAddress = ipaddressctrl->GetAddress(DwordAddress);
sprintf(CharAddress,"%d",DwordAddress);
edit->SetWindowText(CharAddress);
}
Thank you.