User Interface API Reference

Overview

The User Interface (UI) API provides a comprehensive set of functions and structures for creating and managing the graphical user interface of Windows applications. This includes everything from window creation and message handling to drawing, controls, and user input.

Key Areas

  • Window Management: Functions for creating, destroying, and managing application windows, including their properties, size, and position.
  • Message Loop: The core mechanism for handling user input and system events through messages.
  • Control Elements: APIs for standard controls like buttons, edit boxes, list boxes, and more.
  • Graphics and Drawing: Functions for rendering text, shapes, and images within windows using GDI or GDI+.
  • User Input: Handling keyboard, mouse, and touch input events.
  • Dialog Boxes: Creating and managing modal and modeless dialogs.
  • Common Controls: Access to the enhanced controls provided by the Common Control Libraries (ComCtl32.dll).

Featured Functions

CreateWindowEx

CreateWindowEx(dwExStyle, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)

Creates an extended window.

DefWindowProc

DefWindowProc(hWnd, Msg, wParam, lParam)

Dispatches default message processing for a window procedure.

GetMessage

GetMessage(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax)

Retrieves a message from the thread's message queue.

TranslateMessage

TranslateMessage(lpMsg)

Translates virtual-key messages into character messages.

DispatchMessage

DispatchMessage(lpMsg)

Sends a message to a destination window procedure.

MessageBox

MessageBox(hWnd, lpText, lpCaption, uType)

Displays a modal dialog box that contains an application-defined message and title, along with specified buttons and icons.

InvalidateRect

InvalidateRect(hWnd, lpRect, bErase)

Adds a rectangle to the painting update region of the specified window.