-
The so-called handle is actually a piece of data, a long piece of data.
Handles are unique integers that Wondows uses to identify objects that are created or used by an application, and Windows uses a variety of handles to identify applications such as application instances, windows, controls, bitmaps, GDI objects, and so on. Windows handles are a bit like file handles in C.
-
The handle handle in the VC is actually a void * type. Like file in C, it's a struct, and file * is actually a struct address type. A handle is similar to a pointer in Windows, it is a pointer type, but it is different from a pointer.
For example, if you allocate a piece of removable memory, you can get a fixed handle, but the pointer to the memory is not fixed. There are many other types of handles, all of which are defined by handles. In Windows programming, a handle represents a unique object in the system, such as a file handle, an icon handle, a font handle, a bitmap handle, a brush handle, a device environment handle, an application module handle, a process handle, a window handle, and so on.
Since Windows is closed, Microsoft provides a number of ready-made functions (Windows APIs) where a handle is one that accesses such an object"Pointer"to access these objects through handles.
The Handle type is defined in the Windows SDK header file as follows:
typedef void *pvoid;
typedef pvoid handle;typedef handle hicon, such as file handles, process handles, etc.; icon handle typedef handle hfont; font handle typedef handle hbitmap; bitmap handle typedef handle hbrush; typedef handle hdc; device environment handle typedef handle hmodule; module handle typedef handle hwnd; There are many other types of handle for window handles.
-
There is no such thing as a handle class in C++.
In Windows programming, there is a concept of handle, the type is handle, this is not actually a class, handle is actually just a type definition in Windows, and its internal type is a numeric type (such as int), which is just to uniquely mark an object kernel object.
-
C++ Programming Ideas Volume 1: Introduction to Standard C++ - Chapter 5: Handle Class, or "Cheshire Cat".
The main purpose is to hide the implementation part of the interface and reduce the recompilation of the project.
Example: Class Handle
In the implementation section. CPP.
struct handle_::cheshire_void handle_::initialize().
-
It's an improvement of the ** class, and it's a copy of the original object.
-
Wondows is a unique integer used by Wondows to identify objects created or used by an application, and Windows uses a variety of handles to identify applications such as application instances, windows, controls, bitmaps, GDI objects, etc. Windows handles are a bit like file handles in C.
Windows handles are a bit like file handles in C.
A handle is a special kind of smart pointer. Handles are used when an application wants to reference a block of memory or object managed by another system (e.g., database, operating system). 2. The foundation of the whole Windows programming.
-
Handles, which are the foundation of the entire Windows programming. A handle is a unique integer value, a 4-byte (8-byte in a 64-bit program) long value, that identifies different objects in an application and different instances of the same kind of objects, such as a window, button, icon, scrollbar, output device, control, or file. The application can access the information of the corresponding object through a handle, but the handle is not a pointer, and the program cannot use the handle to read the information in the file directly.
If the handle is not in the IO file, it is useless. Handles are unique integers that Windows uses to mark or use in an application, and Windows uses a large number of handles to mark many objects.
A handle is a special kind of smart pointer.
-
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.
In
-
MFC has a handle because the handle is the base script of Windows programming (not MFC, not C++), and because Windows has a basic library, not only C++ support, but also many programming languages under Windows support, therefore, MFC must also support this handle.
A handle is actually a memory address marker, which is used to mark an object (including processes, windows, device DCs, brushes, etc.), and records the memory address of these objects. Conceptually, it's similar to a pointer, but because it's not a C++ thing, it can't be used as a pointer directly.
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
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
1. Ji is in ancient times.
It's a kind of surname that already exists. Later, it was extended to the good name of women, and it was extended to refer to concubines. >>>More
E brake in the car is electroinic brake, that is, electronic braking. The English abbreviation is EPB (Electrical Park Brake), EPB calculates the slope through the longitudinal acceleration sensor built into its computer, so that it can calculate the sliding force of the vehicle due to gravity on the slope, and the computer balances the sliding force by applying braking force to the rear wheels through the motor, so that the vehicle can stop on the slope. >>>More
書马 [pāi mǎ].
"Slapping on the back" means flattering and flattering one's boss. In addition, Mongolia is a nation that immediately wins the world, so most of the ** in the Yuan Dynasty were born as military generals, and the best praise for the subordinates to their superiors is to praise his horses. On the one hand, the Mongols are very fond of horses, and on the other hand, horses are also a symbol of his power, identity, and status, so praising his horses is tantamount to praising him. >>>More