回覆列表
  • 1 # lalbemdmk

    //將CString 型IP地址在IPAddressCtrl中顯示 CString strIP="192.168.1.1"; DWORD dwIP; dwIP = inet_addr(strIP); unsigned char *pIP = (unsigned char*)&dwIP; m_ipAddr.SetAddress(*pIP, *(pIP+1), *(pIP+2), *(pIP+3)); //將IPAddressCtrl中的IP地址獲得並轉換成CString型 unsigned char *pIP; CString strIP; DWORD dwIP; m_ipAddr.GetAddress(dwIP); pIP = (unsigned char*)&dwIP; strIP.Format("%u.%u.%u.%u",*(pIP+3), *(pIP+2), *(pIP+1), *pIP);

  • 2 # 泰迪神蹟

    //將CString 型IP地址在IPAddressCtrl中顯示

    CString strIP="192.168.1.1";

    DWORD dwIP;

    dwIP = inet_addr(strIP);

    unsigned char *pIP = (unsigned char*)&dwIP;

    m_ipAddr.SetAddress(*pIP, *(pIP+1), *(pIP+2), *(pIP+3));

    //將IPAddressCtrl中的IP地址獲得並轉換成CString型

    unsigned char *pIP;

    CString strIP;

    DWORD dwIP;

    m_ipAddr.GetAddress(dwIP);

    pIP = (unsigned char*)&dwIP;

    strIP.Format("%u.%u.%u.%u",*(pIP+3), *(pIP+2), *(pIP+1), *pIP);

    參考別人的,可以借鑑下。

  • 中秋節和大豐收的關聯?
  • 日公賽女單正賽對陣正式出爐,國乒5人扎堆同組,顧玉婷抽中伊藤,具體賽程如何安排?