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. HANDLE in MFC

HANDLE in MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++
6 Posts 6 Posters 1 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.
  • M Offline
    M Offline
    manju23reddy
    wrote on last edited by
    #1

    what does the handle types exactly means...

    T K R P J 5 Replies Last reply
    0
    • M manju23reddy

      what does the handle types exactly means...

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      it is a unique identifier for an object that the OS can manage/handle... hence its name

      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

      1 Reply Last reply
      0
      • M manju23reddy

        what does the handle types exactly means...

        K Offline
        K Offline
        kapardhi
        wrote on last edited by
        #3

        Reference : MSDN web pages The [handle] attribute specifies a user-defined or "customized" handle type. User-defined handles permit developers to design handles that are meaningful to the application. A user-defined handle can only be defined in a type declaration, not in a function declarator. A parameter of a type defined by the [handle] attribute is used to determine the binding for the call and is transmitted to the called procedure.

        1 Reply Last reply
        0
        • M manju23reddy

          what does the handle types exactly means...

          R Offline
          R Offline
          Roger Stoltz
          wrote on last edited by
          #4

          manju23reddy wrote:

          what does the handle types exactly means...

          A handle only makes sense to the module that created the handle. Any client must not interpret the value of the handle, it's only use is to identify something that the library is operating on. This is not specific to MFC or any other framework/library. The data type HANDLE is usually a typedef'ed void*, which means that it is as wide as the processor architecture it executes in. An explicit type cast can be made inside the library without losing precision or bits to e.g. int.

          "It's supposed to be hard, otherwise anybody could do it!" - selfquote
          "High speed never compensates for wrong direction!" - unknown

          1 Reply Last reply
          0
          • M manju23reddy

            what does the handle types exactly means...

            P Offline
            P Offline
            pc_dev
            wrote on last edited by
            #5

            Windows OS keeps track of resorces (Menus/windows) by giving them a unique number this numer is called a handle. to play with any resourse u need to refer that handel just like to post a latter u need an address.

            1 Reply Last reply
            0
            • M manju23reddy

              what does the handle types exactly means...

              J Offline
              J Offline
              Jijo Raj
              wrote on last edited by
              #6

              You already got couple of good explanations about handle. As an add-on information, have a look at this article - Give Me a Handle, and I'll Show You an Object[^]. It will give you more info about handles. Regards, Jijo.

              _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

              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