Question #52407

Why do we use HANDLE keyword in C++ ,and what is the purpose of using it ?

Expert's answer

HANDLE – descriptor (a pointer to a structure describing the properties of a particular object, for
example, some windows, processes, files) is used to describe a variety of
objects to change the properties of an object or information about its
properties.
Fordifferent types of objects there are different descriptors. The handle of the
object can be described as follows:
HANDLE h;
 
// gets a handle to the device input or output:
HANDLE h = GetStdHandle(DWORD nStdHandle);
 
HANDLE – object handle.
HBITMAP – handle bitmap.
HBRUSH – brush handle.
HCURSOR – cursor handle.
HDC – a device context handle. From phrases handledevice context.
HFONT – font handle.
HICONS – cryptogram descriptor.
HINSTANCE – handle to the application instance.
HMENU – menu handle.
HPEN – descriptor pen.
HWND – window handle. From phrases handle window.
LATEST TUTORIALS
APPROVED BY CLIENTS