An application uses a special set of messages, called appbar messages, to add or remove an appbar, set an appbar's size and position, and retrieve information about the size, position, and state of the taskbar. To send an appbar message, an application must use the SHAppBarMessage function. The function's parameters include a message identifier, such as ABM_NEW, and the address of an APPBARDATA structure. The structure members contain information that the system needs to process the given message.
For any given appbar message, the system uses some members of the APPBARDATA structure and ignores the others. However, because the system always uses the cbSize and hWnd members, an application must fill these members for every appbar message. The cbSize member specifies the size of the structure, and the hWnd member is the handle of the appbar's window.
Some appbar messages request information from the system. When processing these messages, the system copies the requested information into the APPBARDATA structure.