Basic Windows Data Types and how Windows works

Source: Internet
Author: User

Basic Windows Data Types


The following lists commonly used data types, including complex, integer, floating point, Boolean, pointer, and handle types specific to Windows applications, it indicates that the pointer data type is usually prefixed with P or LP, while the handle type is always prefixed with H.

Type Definition
-------------------------------------------------------------
ATOM (reference value of a string in an atomic table) BOOL
BOOLEAN (logical) variable (should be TRUE or FALSE)
BYTE bytes (8 bits)
CCHAR Windows characters
CHAR Windows characters
Colorref rgb (red, green, and blue) color value (32 bits)
Variable whose value remains unchanged during CONST execution
DLGPROC points to the callback process pointer of the dialog box defined by the application
DWORD dual-character (32-bit)
DWORDLONG (64-bit)
FARPROC points to the application-defined pointer
Float float Variables
Globalhandle global memory block handle
Haccel key table handle
Handle object handle
Hbitmap bitmap handle
HBRUSH paint brush handle
HDC device description table handle
HFILE file handle
HFONT font handle
Hgdiobj gdi (Graphic device interface) object handle
HGLOBAL global memory block handle
HHOOK hook handle
HICON icon handle
HINSTANCE handle
HLOCAL local memory handle
HMENU handle
HOOKPROC pointer to the hook defined by the application
HPALETTE palette handle
HPEN paint handle
HWND window handle
LOCALHAND local memory handle
LONG 32-bit unsigned Value
LONGLONG 64-bit unsigned Value
LPARAM 32-bit message Parameters
Indicates the pointer to a Windows regular string ending with a null character.
LPSTR pointer to a Windows string (ended with a null character)
LPVOID points to any type of pointer
PROC pointer to the callback function
SHORT integer
UCHAR unsigned Windows characters
Uint unsigned integer
Ulong unsigned long integer (32-bit)
Ushort unsigned integer (16 bits)
Void of any type
Wndproc pointer to the window process defined in the Application
WORD unsigned characters (16 digits)
WPARAM 32-bit message Parameters

 

How Windows programs work


WINDOWS program design is a program design method completely different from the traditional DOS method. It is an event-driven program design mode. There are many operable visual objects in the interface provided by the program to the user. The user selects any of all possible operations. The selected operation will generate some specific events. After these events occur, the message will be sent to some objects in the program, then these objects call corresponding message processing functions to complete specific operations. A windows application has no fixed process, but a specific sub-process for processing an event. a windows application consists of many such sub-processes.


From the above discussion, we can see that Windows applications are object-oriented in nature. The visual object provided by the program to the user interface is generally an object inside the program. The user's operations on the Visual Object trigger the available methods of the corresponding object through the event-driven mode. The running process of a program is the process in which external operations of users continuously generate events and these events are processed by corresponding objects. The following describes how a Windows program works.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.