Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. using CIPAddressCtrl::GetAddress

using CIPAddressCtrl::GetAddress

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++question
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    viperlogic
    wrote on last edited by
    #1

    hi i have a small app im putting together. i have put in a "IP Address" box and have a button then when click will store the ip address. from what i can see you use CIPAddressCtrl::GetAddress to get this address, what am i doing wrong below? I am using vc++6. BYTE nField0, nField1, nField2, nField3; int rc = CIPAddressCtrl::GetAddress(nField0, nField1, nField2, nField3); should that not put the address into each one of those byte fields? i am getting an error as below.. error C2352: 'CIPAddressCtrl::GetAddress' : illegal call of non-static member function. afxcmn.h(1112) : see declaration of 'GetAddress' please help thanks

    D 1 Reply Last reply
    0
    • V viperlogic

      hi i have a small app im putting together. i have put in a "IP Address" box and have a button then when click will store the ip address. from what i can see you use CIPAddressCtrl::GetAddress to get this address, what am i doing wrong below? I am using vc++6. BYTE nField0, nField1, nField2, nField3; int rc = CIPAddressCtrl::GetAddress(nField0, nField1, nField2, nField3); should that not put the address into each one of those byte fields? i am getting an error as below.. error C2352: 'CIPAddressCtrl::GetAddress' : illegal call of non-static member function. afxcmn.h(1112) : see declaration of 'GetAddress' please help thanks

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      GetAddress() is not a static member. It must be called in the context of a CIPAddressCtrl object. Use ClassWizard to associate the control with a CIPAddressCtrl object.


      "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

      "There is no death, only a change of worlds." - Native American Proverb

      V 1 Reply Last reply
      0
      • D David Crow

        GetAddress() is not a static member. It must be called in the context of a CIPAddressCtrl object. Use ClassWizard to associate the control with a CIPAddressCtrl object.


        "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

        "There is no death, only a change of worlds." - Native American Proverb

        V Offline
        V Offline
        viperlogic
        wrote on last edited by
        #3

        many thanks for the reply can you further explain this as MFC is new to me? thansk again

        D 1 Reply Last reply
        0
        • V viperlogic

          many thanks for the reply can you further explain this as MFC is new to me? thansk again

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          keithlee wrote:

          can you further explain this as MFC is new to me?

          Which part? Use Ctrl+W to open ClassWizard. Click the Member Variables tab. Select the desired control and click the Add Variable... button.


          "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

          "There is no death, only a change of worlds." - Native American Proverb

          V 1 Reply Last reply
          0
          • D David Crow

            keithlee wrote:

            can you further explain this as MFC is new to me?

            Which part? Use Ctrl+W to open ClassWizard. Click the Member Variables tab. Select the desired control and click the Add Variable... button.


            "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

            "There is no death, only a change of worlds." - Native American Proverb

            V Offline
            V Offline
            viperlogic
            wrote on last edited by
            #5

            stupid me!! i had that already done with out knowing it m_strIP2.GetAddress(nField0, nField1, nField2, nField3); did the trick then thanks for your help

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups