Common API functions in Delphi
Adjustwindowrect specifies a window style and calculates the size of the window required to obtain the rectangle of the target customer area.
Anypopup determines whether any pop-up window exists on the screen
Arrangeiconicwindows arranges a minimum child window of a parent window
Attachthreadinput connection thread Input Function
Begindeferwindowpos starts the process of building a series of new window positions
Bringwindowtotop: Bring the specified window to the top of the window list
Cascadewindows arrange windows in cascade Mode
Childwindowfrompoint: The returned parent window contains the handle of the first child window of the specified vertex.
Clienttoscreen: determines the screen coordinates of a point represented by client zone coordinates in the window.
Closewindow minimizes the specified window
Copy copyrect rectangular content
Deferwindowpos this function specifies a new window location for a specific window
Destroywindow clears the specified window and all its subwindows.
Drawanimatedrects depicts a series of dynamic rectangles
Enablewindow: Allows or disables all mouse and keyboard input in the window specified by enablewindow.
Enddeferwindowpos simultaneously updates the location and status of all windows specified during deferwindowpos calling.
Enumchildwindows: Specifies the parent window to enumerate child windows.
Enumthreadwindows enumeration window related to a specified task
All parent windows in the enumwindows enumeration window list
Duplicate rect to determine whether the two rectangles have the same structure
Findwindow: Find the first top-level window in the window list that meets the specified conditions.
In the window list, find the first child window that matches the specified condition.
Flash window flashes to display the specified window
Getactivewindow: Get the handle of the activity window
Getcapture obtains the handle of a window, which is located in the current input thread and has Mouse capture (received by the mouse activity)
Getclassinfo obtains a copy of The wndclass structure (or wndclassex structure). The structure contains information related to the specified class.
Getclasslong gets a long variable entry of the window class.
Getclassname: Get the class name for the specified window
Getclassword obtains an integer variable for the window class.
Getclientrect returns the size of the rectangle in the specified window.
Getdesktopwindow: Get a window (desktop window) handle representing the entire Screen
Getfocus: Get the handle of the window with the input focus
Getforegroundwindow
Getlastactivepopup obtains the handle of the recently activated pop-up window in a given parent window.
Getlasterror is used to obtain the extended error message for the previously called API function.
Getparent determines the parent window of a specified window
Gettopwindow searches for the internal window list and finds the handle of the first window of the specified window.
Getupdaterect obtains a rectangle that describes the part of the specified window to be updated.
Getwindow obtains the handle of a window, which has a specific relationship with a source window.
Getwindowcontexthelpid gets the help scenario ID associated with the window
Getwindowlong obtains information from the structure of the specified window.
Getwindowplacement
Getwindowrect obtains the range rectangle of the entire window. The border, title bar, scroll bar, and menu of the window are all in this rectangle.
Getwindowtext gets the title text of a form, or the content of a control.
Getwindowtextlength investigate the length of text or control content in the window title
Getwindowword obtains information about the specified window structure.
Inflaterect increases or decreases the size of a rectangle.
The intersectrect function loads a rectangle in lpdestrect, which is the intersection of the two rectangles lpsrc1rect and lpsrc2rect.
Invalidaterect shields all or part of a window's customer Zone
Ischild checks whether a window is a child or subordinate window of another window.
Isiconic determines whether the window has been minimized
Isrectempty checks whether a rectangle is empty
Iswindow: determines whether a window handle is valid
Iswindowenabled: checks whether the window is active.
Iswindowunicode checks whether a window is a unicode window. This means that the window receives Unicode text for all text-based messages.
Iswindowvisible: determines whether the window is visible
Iszoomed determines whether the window is maximized
Lockwindowupdate: locks the specified window and disables update.
Mapwindowpoints converts the coordinates of the customer zone in one window to the coordinate system of the customer zone in the other window.
Movewindow changes the position and size of the specified window
Offsetrect moves the rectangle by applying a specified offset.
Openicon restores a minimalProgramAnd activate it.
Ptinrect: determines whether the specified vertex is inside the rectangle.
Redrawwindow redraw all or part of the window
Releasecapture: Release Mouse capture for the current application
Screentoclient determines the customer zone coordinates of a specified point on the screen
All or part of the client area of the scrollwindow rolling window
Scrollintowex scroll all or part of the customer area of the window according to the additional options
Setactivewindow activates the specified window
Setcapture: Set the Mouse capture to the specified window
Setclasslong sets a long variable entry for the window class
Setclassword: Set an entry for the window class
Setfocusapi sets the input focus to the specified window. The window will be activated if necessary
Setforegroundwindow: Set the window to the foreground window of the system.
Setparent specifies the new parent of a window
Setrect: Set the content of the specified rectangle
Setrectempty: Set the rectangle to an empty rectangle.
Setwindowcontexthelpid sets the help scenario (context) ID for the specified window
Setwindowlong sets the information for the specified window in the window structure.
Setwindowplacement
Setwindowpos specifies a new position and status for the window
Setwindowtext: Set the title text or control content of the window
Setwindowword specifies window settings in the window structure.
Showownedpopups: display or hide all pop-up windows owned by the specified window
Showwindow control window visibility
Showwindowasync is similar to showwindow
Subtractrect loads the rectangular lprcdst, which is the result of subtracting lprcsrc2 from the rectangular lprcsrc1.
Tilewindows arrange windows in Tiled order
Unionrect loads an lpdestrect target rectangle, which is the result of the combination of lpsrc1rect and lpsrc2rect.
Updatewindow force update window
All or part of the validaterect validation window
Windowfrompoint returns the handle of the window containing the specified vertex. Ignore shielding, hiding, and transparent windows
Tsqgw (14:48:00)
Activatekeyboardlayout activates a new keyboard layout. The keyboard layout defines the position and meaning of keys on a physical keyboard.
Beep is used to generate simple sound
Chartooem converts a string from the ANSI character set to the OEM Character Set
Clipcursor limits the pointer to a specified area
Convertdefalocallocale converts a special local identifier to a real local ID.
Createcaret creates an insert operator (cursor) based on the specified information and selects it as the default insert operator of the specified window.
Destroycaret clears (destroys) an insert Operator
Enumcalendarinfo enumeration of calendar information available in the specified "local" Environment
Enumdateformats lists available long and short date formats in the specified "local" Settings
The enumsystemcodepages enumeration system has been installed or supportedCodePage
The enumsystemlocales enumeration system has been installed or supports "local" settings.
Enumtimeformats enumerates the time format applicable to a specified place
Exitwindowsex exits windows and restarts with specific options
Expandenvironmentstrings expanded environment string
Freeenvironmentstrings: Translation of specified environment string Blocks
Getacp identifies the ANSI code page currently in effect
Getasynckeystate determines the status of the specified virtual key when the function is called
Getcaretblinktime determines the blinking frequency of the insert operator cursor
Getcaretpos
Getclipcursor obtains a rectangle to describe the cut area currently specified by the mouse pointer.
Getcommandline gets a pointer to the current command line buffer
Getcomputername: Get the name of this computer
Getcpinfo obtains information related to the specified code page.
Getcurrencyformat is used to format a number based on the currency format.
Getcursor obtains the handle of the currently selected mouse pointer
Getcursorpos: Get the current cursor position
Getdateformat format a system date for the specified "local" Format
Getdoubleclicktime determines the interval between two consecutive mouse clicks that will be processed as a double-click event
Getenvironmentstrings is a memory block that contains the current environment string settings and returns a handle.
Getenvironmentvariable obtains the value of an environment variable.
Getinputstate determines whether there are any pending mouse or Keyboard Events
Getkbcodepage is replaced by getoemcp, which has the same functions.
Getkeyboardlayout gets a handle that describes the keyboard layout of the specified application.
Getkeyboardlayoutlist to obtain a list of all keyboard layouts applicable to the System
Getkeyboardlayoutname gets the name of the current active keyboard layout
Getkeyboardstate: obtains the current status of each virtual key on the keyboard.
Getkeyboardtype for information about the keyboard in use
Getkeynametext determines the key name based on the scan code.
Getkeystate determines the status of the specified virtual key when you input the last time for processed buttons.
Getlasterror is used to obtain the extended error message for the previously called API function.
Getlocaleinfo obtains information related to the specified "location ".
Getlocaltime get local Date and Time
Getnumberformat format a number in a specific format for a specified "location ".
Getoemcp identifies the Windows code page that is converted between the OEM and ANSI character sets
Getqueuestatus determines the type of the message to be determined (waiting for processing) in the application Message Queue
Getsyscolor determines the color of the specified Windows Display object
Getsystemdefaultlangid obtains the default language ID of the system.
Getsystemdefaultlcid gets the current default system "local"
Getsysteminfo obtains information about the underlying hardware platform.
Getsystemmetrics returns information related to the Windows Environment
Getsystempowerstatus obtains information about the current system power status.
Getsystemtime gets the current system time, which is in the coordinated world Time (UTC, also known as GMT) format.
Getsystemtimeadjustment synchronizes the internal system clock with an external clock signal source
Getthreadlocale gets the local ID of the current thread
Gettickcount is used to obtain the length of time (MS) that has elapsed since Windows was started)
Gettimeformat format a system time according to a specific format for the specified "location"
Gettimezoneinformation obtains information related to system time zone settings.
Getuserdefaultlangid is the default language ID obtained by the current user.
Getuserdefaultlcid gets the default "local" setting of the current user
GetUserName: get the name of the current user
Getversion: determine the current Windows and DOS versions.
Getversionex obtains version information related to the platform and operating system.
Hidecaret hides the insert operator (cursor) in the specified window)
Isvalidcodepage determines whether a code page is valid
Isvalidlocale determines whether the local ID is valid
The keybd_event function simulates keyboard operations.
Loadkeyboardlayout load a keyboard layout
Mapvirtualkey performs different scan codes and character Conversion Based on the specified ing type
Mapvirtualkeyex performs different scan codes and character Conversion Based on the specified ing type
Messagebeep plays a system sound. The system sound distribution scheme is determined in the control panel.
Mouse_event simulates a mouse event
Oemkeyscan determines the scanning code and shift key status of an ASCII character in the OEM Character Set
Oemtochar converts a string from the OEM character set to the ANSI character set
Setcaretblinktime specifies the blinking frequency of the insert operator (cursor)
Setcaretpos specifies the position of the insert Operator
Setcomputername: set the new computer name
Setcursor sets the specified mouse pointer to the current pointer
Setcursorpos: Set the pointer position
Setdoubleclicktime sets the interval between two consecutive mouse clicks that the system considers as a double-click event
Setenvironmentvariable sets an environment variable to a specified value.
Setkeyboardstate sets the current state of each virtual key on the keyboard
Setlocaleinfo changes the user's "location" Settings
Setlocaltime: set the current local time
Setsyscolors: Set the color of the object displayed in the specified window.
Setsystemcursor changes any standard system pointer
Setsystemtime: set the current system time
Setsystemtimeadjustment regularly adds a calibration value to synchronize the internal system clock with an external clock signal source
Setthreadlocale: Set the location for the current thread
Settimezoneinformation: Set system time zone information
Showcaret displays the insert operator (cursor) in the specified window)
Showcursor controls the visibility of the mouse pointer
Swapmousebutton determines whether to swap the left and right mouse keys
Systemparametersinfo: gets and sets a large number of Windows System Parameters
Systemtimetotzspecificlocaltime converts system time to local time
Toascii converts a virtual key into ASCII characters based on the current scan code and keyboard information.
Tounicode converts a virtual key to a Unicode character based on the current scan code and keyboard information.
Unloadkeyboardlayout unmount the specified keyboard layout
Vkkeyscan identifies the status of the virtual key code and shift key for an ASCII character set in windows.
End
Tsqgw (14:50:00)
Appendmenu adds a menu item to the specified menu
Checkmenuitem
Checkmenuradioitem
Createmenu create a menu
Createpopupmenu: Create an empty pop-up menu
Deletemenu: delete a specified menu entry
Destroymenu
Drawmenubar is used to redraw a menu for a specified window.
Enablemenuitem allows or disables specified menu entries
Getmenu: Get the handle of a menu in the window.
Getmenucheckmarkdimensions returns the size of a menu check mark.
Getmenucontexthelpid obtains the help scenario ID of a menu.
Getmenudefaultitem determines which item in the menu is the default item
Getmenuitemcount returns the number of entries (menu items) in the menu.
Getmenuitemid: return the menu ID of the entry at the specified position in the menu.
Getmenuiteminfo obtains (receives) specific information related to a menu entry.
Getmenuitemrect loads the screen coordinate information of the specified menu bar in a rectangle
Getmenustate: obtains information about the status of a specified menu entry.
Getmenustring
Getsubmenu gets the handle of a pop-up menu, which is located at the specified position in the menu
Getsystemmenu gets the system menu handle of the specified window
Hilitemenuitem controls the highlighted display status of top-level menu entries
Insertmenu inserts a menu entry at the specified position of the menu, and moves other entries downward as needed
Insertmenuitem Insert a new menu entry
Ismenu determines whether the specified handle is a menu handle
Loadmenu loads a menu from a specified module or application instance
Loadmenuindirect loads a menu
Menuitemfrompoint: determines which menu entry contains a specified Vertex on the screen.
Modifymenu
Removemenu deletes a specified menu entry
Setmenu
Setmenucontexthelpid: Set the help scenario ID of a menu
Setmenudefaultitem sets a menu entry as the default entry
Setmenuitembitmaps sets a specific bitmap so that it can be used in the specified menu entry, instead of the standard checkmark (√)
Setmenuiteminfo sets the specified information for a menu entry
Trackpopupmenu displays a pop-up menu anywhere on the screen
Trackpopupmenuex is similar to trackpopupmenu, but it provides additional functions.
End
The following are some types of menu functions.
The menuiteminfo structure contains the menu entry information.
The structure of tpmparams is used for the trackpopupmenuex function to support additional functions.
Tsqgw (14:50:00)
Abortpath discards all paths selected for a specified device scenario. Cancel creating any path currently in progress
Anglearc draws a line with a connection arc
Draw an arc
Beginpath starts a path Branch
Canceldc cancels the long Drawing operation in another thread
Draw a string with chord
Closeenhmetafile disables the specified Enhanced Metafile device scenario, and returns a handle to the newly created Metafile.
When closefigure depicts a path, close the currently opened Image
Closemetafile disables the specified Metafile device scenario and returns a handle to the newly created Metafile
Copyenhmetafile: Create a copy (copy) of the specified enhanced primitive File)
Copymetafile: Creates a copy of a specified (standard) Metafile.
Createbrushindirect creates a brush based on a logbrush Data Structure
Createdibpatternbrush creates a brush with a device-independent bitmap to specify the brush style (pattern)
Createenhmetafile: Create an Enhanced Metafile device scenario
Createhatchbrush creates a shadow brush
Createmetafile: Create a Metafile device scenario
Createpatternbrush creates a brush with a bitmap of the specified brush pattern
Createpen creates a paint brush with the specified style, width, and color
Createpenindirect creates a paint brush Based on the specified logpen structure.
Createsolidbrush create a brush with solid color
Deleteenhmetafile: delete a specified Enhanced Metafile.
Deletemetafile: delete a specified Metafile
Deleteobject: Delete the GDI object. All system resources used by the object will be released.
Drawedge depicts the border of a rectangle with the specified Style
The drawescape code change function sends data directly to the display device driver.
Drawfocusrect draws a focal rectangle
Drawframecontrol depicts a standard control
Drawstate applies a variety of effects to an image or drawing operation
Ellipse depicts an ellipse surrounded by a specified rectangle
The endpath stops defining a path.
Enumenhmetafile: for an enhanced-type Metafile, it lists individual Metafile records.
Enummetafile is a standard Windows Metafile enumeration of individual Metafile records
Enumobjects enumeration brushes and brushes that can be used along with a specified device scenario
Extcreatepen creates an extension paint brush (decoration or ry)
Extfloodfill fills an area with the selected brush in a specified device scenario
Fillpath: close any opened image in the path and fill it with the current brush.
Fillrect fills a rectangle with the specified brush
Flattenpath converts all curves in a path into line segments
Floodfill fills an area in the specified device scenario with the selected brush
Framerect draws a border around a rectangle with the specified brush
Gdicomment adds a comment for the specified Enhanced Metafile device scenario
Gdiflush performs any pending drawing operations
Gdigetbatchlimit: determines how many GDI drawing commands are in the queue
Gdisetbatchlimit specifies how many GDI drawing commands can enter the queue
When getarcdirection draws an arc, it determines the current drawing direction
Getbkcolor: obtains the current background color of a specified device scenario.
Getbkmode obtains the current background filling mode for specified device scenarios.
Getbrushorgex determines the starting point of the selected brush in a specified device scenario
Getcurrentobject: Get the currently selected object of the specified type
Getcurrentpositionex obtains the current paint position in the specified device scenario.
Getenhmetafile: obtains the metadata file handle of an Enhanced Metafile contained in the disk file.
Getenhmetafilebits copies the specified Enhanced Metafile to a memory buffer.
Getenhmetafiledescription returns the description of an Enhanced Metafile.
Getenhmetafileheader: obtains the Metafile header of the enhanced primitive file.
GetEnhMetaFilePaletteEntries
Getmetafile: Get the metadata file handle of the metadata file contained in a disk file
Getmetafilebitsex copies the specified Metafile to a memory buffer
Getmiterlimit: Set the slope limit (miter) for the device scenario.
Getnearestcolor obtains a solid color closest to the specified color based on the display capability of the device.
Getobjectapi gets a structure that describes the specified object
Getobjecttype determines the type of the GDI object referenced by the specified handle
Getpath gets a series of data defined for the current path
Getpixel obtains the RGB value of a pixel in a specified device scenario.
Getpolyfillmode obtains the polygon filling mode for specified device scenarios.
Getrop2 obtains the current drawing mode for a specified device scenario
Getstockobject gets an inherent object (stock)
Getsyscolorbrush gets a brush for any standard system color
Getwinmetafilebits: fills in data for standard graph meta files in a buffer, and converts an enhanced primitive file to a standard Windows Metafile
Invertrect reverses the specified rectangle in a device scenario by reversing the value of each pixel.
Linedda enumeration all vertices in a specified line segment
Lineto draws a line with the current paint brush and connects it from the current position to a specified vertex.