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. Retreiving Hex data from edit box

Retreiving Hex data from edit box

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 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.
  • R Offline
    R Offline
    rajeev82
    wrote on last edited by
    #1

    Hi all, when some one enters a hex value in a edit box ,say for example 0xffff ,then is there any way by which the value can be retreived as integer itself (not as text)?? when i retreive the data as text and try to convert it using atoi or atof routines the output is always 0.It'd be great if someone through some light on this ...... Thanks in advance rajeev

    C 1 Reply Last reply
    0
    • R rajeev82

      Hi all, when some one enters a hex value in a edit box ,say for example 0xffff ,then is there any way by which the value can be retreived as integer itself (not as text)?? when i retreive the data as text and try to convert it using atoi or atof routines the output is always 0.It'd be great if someone through some light on this ...... Thanks in advance rajeev

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      You can use strtol[^] to convert your hexa string into a long. With this function, you can supply the base (which is 16 in your case).


      Cédric Moonen Software developer
      Charting control

      R 1 Reply Last reply
      0
      • C Cedric Moonen

        You can use strtol[^] to convert your hexa string into a long. With this function, you can supply the base (which is 16 in your case).


        Cédric Moonen Software developer
        Charting control

        R Offline
        R Offline
        rajeev82
        wrote on last edited by
        #3

        strtol[] did the job...Thanks for ur 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