Solved

what exactly is a handle

Posted on 2006-06-25
8
159 Views
Last Modified: 2010-04-23
I have read on handles a bit but I am still unsure of what it is. Is it a pointer like in c. What exacly is a handle?

Thanks

San
0
Comment
Question by:Sanmarie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 37

Expert Comment

by:Harisha M G
ID: 16979549
Hi, it is a unique identifier assigned by Windows to almost every object it creates..

Basically, it is an unsigned integer. (Just a typedef)

---
Harish
0
 

Author Comment

by:Sanmarie
ID: 16979593
So, it is a unique identifier that points to every object in windows, kind of like a integer pointer if you know C ?

So this means that I can get the control by using its integer handle value?

Thanks
0
 
LVL 37

Accepted Solution

by:
Harisha M G earned 50 total points
ID: 16979662
No, it is NOT a pointer.

It is not the address of any location either.

Say you create a form, and a button inside it.

Then windows will create the following (Not exactly, but as an example)

- Form (Handle: 1)
- Title Bar (Handle: 2)
- Minimize Button (Handle: 3)
- Maximize Button (Handle: 4)
- Close Button (Handle: 5)
- Your Button (Handle: 6)

So, it is just an value to uniquely identify every object in Windows.

You can use Windows APIs to know what is the type, position and property of an object if you know its handle.
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

Author Comment

by:Sanmarie
ID: 16979672

excellent!

Thank you

San
0
 

Author Comment

by:Sanmarie
ID: 16979686
I know I closed the question. but just to clarify,

the purpose of a handle is for using the windows api? It uniquely identifies an object in windows but what is its other purpose
0
 

Author Comment

by:Sanmarie
ID: 16979690
thanks for the links

san
0
 
LVL 37

Expert Comment

by:Harisha M G
ID: 16979692
Please go through the above link

Glad I could help !
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question