What does handle mean? Is it c, csdn how to look up about the handle

Updated on technology 2024-03-26
2 answers
  1. Anonymous users2024-02-07

    A handle is a (usually 32-bit) integer that represents an object. Handles in Windows are similar to file handles used in traditional C or MS-DOS programming. Programs almost always get a handle by calling a Windows function.

    The program uses this handle in other Windows functions to use the object it represents.

    In Windows, there can be many types of windows. A window can be a rectangular enclosed area on the screen, such as a familiar application window. Controls on a form, such as a list box or scroll bar, can also be windows, but not all types of controls are windows.

    The icons on the desktop and the desktop itself are also windows. Because all of these types of objects are windows, Windows can handle them in a similar way. Windows gives each window a unique handle through which it can be manipulated.

    Many API functions can return a handle or accept a handle as an argument.

    When a window is created, Windows assigns it a handle, and the handle is released when the window disappears.

  2. Anonymous users2024-02-06

    In the Windows environment, handles are used to identify items, which include:

    module

    Task

    instance

    file

    Block of memory

    menu

    Control

    Font

    Resources, including icons, cursors, strings, etc.

    GDI objects, including bitmaps, brushes, metafiles, palettes, pens, regions, and device contexts.

    Instead of using a physical address to identify a block of memory, a file, a task, or a dynamically loaded module, the Windows API assigns a definite handle to these items and returns the handle to the application, which is then manipulated through the handle.

    From the above 2 definitions, we can see that a handle is an identifier, which is used to identify an object or project, it is like our name, everyone will have one, different people's names are different, but there may also be a person whose name is the same as yours. In terms of data type, it's just a 16-bit unsigned integer. Applications almost always get a handle by calling a Windows function, which can then be used by other Windows functions to reference the corresponding object.

    In Windows programming, a large number of handles are used, such as: hinstance (instance handle), hbitmap (bitmap handle), hdc (device description table handle), hicon (icon handle).

Related questions
9 answers2024-03-26

The so-called handle is actually a piece of data, a long piece of data. >>>More

3 answers2024-03-26

3c=three corridors.It is an RPG of War3 and is popular with the majority of War3 players. Especially the welcome of the students on the university campus. >>>More

7 answers2024-03-26

2c means:It is the meaning of business to customer, the pronunciation of 2 in English is the same as to, business-to-customer is the meaning of business to customer, abbreviated as b2c, and its Chinese abbreviation is "business to customer." >>>More

4 answers2024-03-26

That is, the original code of the positive number is itself, the original code of the negative number is the reverse code plus one, and the reverse code is all the negation except for the sign bit.

14 answers2024-03-26

The focal ratio is the ratio of the focal length of the telescope to the aperture, f = f d. >>>More