Thread: CIPAddressCtrl conversion

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    15

    CIPAddressCtrl conversion

    Hi all, is it possible to convert a CIPAddressCtrl variable to a char. Thanks
    Shav

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    could always try something like.....

    byte b1=0,b2=0,b3=0,b4=0;
    char sBuffer[32];
    CString String;
    //get IP
    IPControl.GetAddress(&b1,&b2,&b3,&b4);
    //print to char
    sprintf(sBuffer,"%c.%c.%c.%c",b1,b2,b3,b4);
    // or possibly
    String.Format("%c.%c.%c.%c",b1,b2,b3,b4);
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    15
    Cheers Novacain

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  3. Header File Question(s)
    By AQWst in forum C++ Programming
    Replies: 10
    Last Post: 12-23-2004, 11:31 PM
  4. Do I have a scanf problem?
    By AQWst in forum C Programming
    Replies: 2
    Last Post: 11-26-2004, 06:18 PM
  5. Creation of Menu problem
    By AQWst in forum C Programming
    Replies: 8
    Last Post: 11-24-2004, 09:44 PM