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. The difference between HWND and HINSTANCE

The difference between HWND and HINSTANCE

Scheduled Pinned Locked Moved C / C++ / MFC
4 Posts 4 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.
  • G Offline
    G Offline
    Guoguor
    wrote on last edited by
    #1

    :) Please tell me the difference between HWND and HINSTANCE! thanks

    A N C 3 Replies Last reply
    0
    • G Guoguor

      :) Please tell me the difference between HWND and HINSTANCE! thanks

      A Offline
      A Offline
      Arsalan Malik
      wrote on last edited by
      #2

      Both are void pointers!:) ARSALAN MALIK

      1 Reply Last reply
      0
      • G Guoguor

        :) Please tell me the difference between HWND and HINSTANCE! thanks

        N Offline
        N Offline
        Neelesh K J Jain
        wrote on last edited by
        #3

        the HWND is an opaque handle to an internal Windows data structure that corresponds to a window and consumes system resources when present. A Windows window is identified by a “window handle” but where as HINSTANCE is Handle to an object for which memory is allocated Neelesh Jain

        1 Reply Last reply
        0
        • G Guoguor

          :) Please tell me the difference between HWND and HINSTANCE! thanks

          C Offline
          C Offline
          cmk
          wrote on last edited by
          #4

          HWND is a pointer to an insternal structure that contains the state information for a window. HINSTANCE is a pointer to an internal structure that contains the executable module state information. There is only one HINSTANCE, but there may be 0 or more HWND for a given program. Note: There are also HMODULE, which is a pointer to an internal structure that contains the state information for a module - a module is a dll or exe ... which means that HINSTANCE can also be thought of as being a special type of HMODULE. You use HWND to manipulate windows - move them, resize them, ... You use HINSTANCE/HMODULE to access resources in the exe or dll - icons, bitmaps, strings, ... ...cmk Save the whales - collect the whole set

          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