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. HWND TO string and string to HWND conversion

HWND TO string and string to HWND conversion

Scheduled Pinned Locked Moved C / C++ / MFC
csharp
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.
  • A Offline
    A Offline
    Atif Mushtaq
    wrote on last edited by
    #1

    so far i am able to convert HWND to string but i am not able to find a way to convert string to HWND . There is a way to convert hex string to int but not hex. so either someone tell me int to hex conversion or direct string to hex. Unmanaged in a .NET world

    M 1 Reply Last reply
    0
    • A Atif Mushtaq

      so far i am able to convert HWND to string but i am not able to find a way to convert string to HWND . There is a way to convert hex string to int but not hex. so either someone tell me int to hex conversion or direct string to hex. Unmanaged in a .NET world

      M Offline
      M Offline
      Maxwell Chen
      wrote on last edited by
      #2

      string sApple = "463A"; long lNum; char* pE; lNum = strtol(sApple.c_str(), &pE, 16); printf("0x%X\n", lNum); HWND hW = (HWND)lNum; Maxwell Chen

      A 1 Reply Last reply
      0
      • M Maxwell Chen

        string sApple = "463A"; long lNum; char* pE; lNum = strtol(sApple.c_str(), &pE, 16); printf("0x%X\n", lNum); HWND hW = (HWND)lNum; Maxwell Chen

        A Offline
        A Offline
        Atif Mushtaq
        wrote on last edited by
        #3

        Thanx very much , it really worked , thanx Unmanaged in a .NET world

        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