Click here to Skip to main content
14,697,477 members
Home » Discussions » ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionOptimized Solution for prime numbers.. Pin
Raunak Singh Chauhan6-Nov-14 7:20
MemberRaunak Singh Chauhan6-Nov-14 7:20 
AnswerRe: Optimized Solution for prime numbers.. Pin
Nicolas Dorier6-Nov-14 7:45
professionalNicolas Dorier6-Nov-14 7:45 
GeneralRe: Optimized Solution for prime numbers.. Pin
Raunak Singh Chauhan6-Nov-14 7:49
MemberRaunak Singh Chauhan6-Nov-14 7:49 
GeneralRe: Optimized Solution for prime numbers.. Pin
Nicolas Dorier6-Nov-14 7:56
professionalNicolas Dorier6-Nov-14 7:56 
AnswerRe: Optimized Solution for prime numbers.. Pin
Bernhard Hiller6-Nov-14 23:06
MemberBernhard Hiller6-Nov-14 23:06 
Questionget IP address from Net Address Control (Resolved) Pin
bkelly1310-Oct-14 17:06
Memberbkelly1310-Oct-14 17:06 
AnswerRe: get IP address from Net Address Control Pin
Richard MacCutchan10-Oct-14 22:18
mveRichard MacCutchan10-Oct-14 22:18 
GeneralRe: get IP address from Net Address Control Pin
bkelly1311-Oct-14 10:11
Memberbkelly1311-Oct-14 10:11 
I am not doing well with this. There must be something that I have completely missed and just cannot see. Here is my latest effort.
void CTCP_Client_ConsumerDlg::OnBnClickedButton1()
{           
    NC_ADDRESS   nc_address;
    PNC_ADDRESS p_nc_address = &nc_address;
    p_nc_address->pAddrInfo = 0;
    p_nc_address->PortNumber = 0;
    p_nc_address->PrefixLength = 0;

    HRESULT hr;
    DWORD ip_address = 0;
    DWORD &rip_address = ip_address;

    hr = c_net_work_address_edit_box.GetAddress( p_nc_address );
    ip_address = c_net_work_address_edit_box.GetAddress( p_nc_address );

    int count = c_net_work_address_edit_box.GetAddress( rip_address );
}


I dropped a Network Address Control on the MFC dialog, then right clicked and added variable
c_net_work_address_edit_box.

The page you suggested has:
int GetAddress(
   BYTE& nField0,
   BYTE& nField1,
   BYTE& nField2,
   BYTE& nField3
);
int GetAddress(
   DWORD& dwAddress
);


Which I see is the same as my last attempt. But the compiler complains:
Quote:
error C2664: 'CNetAddressCtrl::GetAddress' : cannot convert parameter 1 from 'DWORD' to 'PNC_ADDRESS'

Thank you for your time
If you work with telemetry, please check this bulletin board: www.irigbb.com


GeneralRe: get IP address from Net Address Control Pin
Richard MacCutchan13-Oct-14 6:10
mveRichard MacCutchan13-Oct-14 6:10 
GeneralRe: get IP address from Net Address Control Pin
bkelly1318-Oct-14 11:44
Memberbkelly1318-Oct-14 11:44 
GeneralRe: get IP address from Net Address Control Pin
Richard MacCutchan18-Oct-14 22:13
mveRichard MacCutchan18-Oct-14 22:13 
GeneralRe: get IP address from Net Address Control Pin
bkelly1319-Oct-14 9:42
Memberbkelly1319-Oct-14 9:42 
Generalserial port access and communication using c Pin
Member 111402618-Oct-14 23:51
MemberMember 111402618-Oct-14 23:51 
GeneralRe: serial port access and communication using c Pin
xenotron9-Oct-14 0:18
Memberxenotron9-Oct-14 0:18 
GeneralRe: serial port access and communication using c Pin
Orjan Westin9-Oct-14 1:58
professionalOrjan Westin9-Oct-14 1:58 
GeneralRe: serial port access and communication using c Pin
xenotron9-Oct-14 2:08
Memberxenotron9-Oct-14 2:08 
GeneralRe: serial port access and communication using c Pin
Orjan Westin9-Oct-14 5:50
professionalOrjan Westin9-Oct-14 5:50 
GeneralRe: serial port access and communication using c Pin
Orjan Westin9-Oct-14 1:55
professionalOrjan Westin9-Oct-14 1:55 
QuestionEnable a control/window in an MFC dialog, Resolved Pin
bkelly138-Oct-14 15:02
Memberbkelly138-Oct-14 15:02 
AnswerRe: Enable a control/window in an MFC dialog, Resolved Pin
Richard MacCutchan8-Oct-14 22:41
mveRichard MacCutchan8-Oct-14 22:41 
GeneralRe: Enable a control/window in an MFC dialog, Resolved Pin
bkelly139-Oct-14 1:34
Memberbkelly139-Oct-14 1:34 
Questioncontrol ID not found, Resolved Pin
bkelly135-Oct-14 15:25
Memberbkelly135-Oct-14 15:25 
AnswerRe: control ID not found Pin
Richard MacCutchan6-Oct-14 0:46
mveRichard MacCutchan6-Oct-14 0:46 
GeneralRe: control ID not found Pin
bkelly136-Oct-14 15:52
Memberbkelly136-Oct-14 15:52 
GeneralRe: control ID not found Pin
Richard MacCutchan6-Oct-14 22:33
mveRichard MacCutchan6-Oct-14 22:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.