Handles?

Started by
2 comments, last by yq 23 years, 7 months ago
Will somebody explane handles to me
Advertisement
Handles as in what? Love handles, door handles or Windows'' handles?

A handle as a generic term can either be a proxy class or a ''token'' of some form that has a specific meaning/value.

Once you clarify what kind of handles you are talking about I''ll try and help.

- Dire Wolf
direwolf@digitalfiends.com
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com
hmmm...Handles are like imitations of actual objects.

Let''s say you have a bitmap file and you want to load it into your program, you would load it to a "bitmap handle." From there you would do what ever to the handle which contain has the data of the bitmap file.

Get it?
I''m going to assume you mean Windows handles like HWND. Basically, it is an ID for an object(stucture) created interanally by Windows. Here''s is basically how I guess you do this. When you call a CreateObject() function or whatever it creates a structure that has fields of information in it and one of those fields it assigns is its handle or ID and that is what is (usually) returned from the function. Then when you call UseObject() function, one of the paramaters is the handle that was returned so it knows which internal object you are reffering to by checking the hanldes. Basically, it''s to provide some object-based programming in C.

This topic is closed to new replies.

Advertisement