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. dword to int

dword to int

Scheduled Pinned Locked Moved C / C++ / MFC
questionwindows-adminlearning
3 Posts 3 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.
  • S Offline
    S Offline
    Scozturk
    wrote on last edited by
    #1

    Hi. I retrieve a value from the registry and it is a dword. I want to display it in a text box and I also want to store it in a interger? How can I do that? Thank you very much in advance! Well... I am a beginner ...

    I V 2 Replies Last reply
    0
    • S Scozturk

      Hi. I retrieve a value from the registry and it is a dword. I want to display it in a text box and I also want to store it in a interger? How can I do that? Thank you very much in advance! Well... I am a beginner ...

      I Offline
      I Offline
      Indrawati
      wrote on last edited by
      #2

      Maybe you can cast it? int an_int = static_cast(a_dword); In VC++, you can display the value of an int like this: CString str; str.format("%d", an_int); MessageBox(str); This may not be the optimal solution though... my Microsoft-specific programming knowledge is seriously lacking.

      1 Reply Last reply
      0
      • S Scozturk

        Hi. I retrieve a value from the registry and it is a dword. I want to display it in a text box and I also want to store it in a interger? How can I do that? Thank you very much in advance! Well... I am a beginner ...

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

        CString str; str.Format("%i", YOURDWORD); yourtextbox.SetWindowText(str); I thing you can just cast it: int yourint; yourint = (int)YOURDWORD; or yourint = static_cast(YOURDWORD); should be something like this. "If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimmy Hendrix

        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