Application desktop toolbars desktop Toolbar

Source: Internet
Author: User

Application desktop toolbars desktop toolbar (1)

An application desktop toolbar (also called An appbar) is a window that is similar to the Microsoft Windows taskbar. it is anchored to an edge of the screen, and it typically contains buttons that give the user quick access to other applications and windows.
The system prevents other applications from using the desktop area occupied by An appbar. Any number of appbars can exist on the desktop at any given time.

The desktop toolbar (also known as AppBar) is a window similar to a job bar in Microsoft Windows. It is close to the edge of the screen. A typical desktop toolbar includes buttons for quick access to other applications and windows. The system prevents other applications from using the area occupied by AppBar. The desktop can coexist with multiple appbars at any time.

 

About Application desktop toolbars

Desktop toolbar Overview

 

Windows provides an application programming interface (API) that lets you take advantage of AppBar services provided by the system. the services help ensure that application-defined appbars operate smoothly with one another and with the taskbar. the System
Maintains information about each AppBar and sends the appbars messages to sort y them about events that can affect their size, position, and appearance.

Microsoft Windows provides an application programming interface (API) to facilitate your use of AppBar service features. These services ensure coordination between AppBar defined by the application and other AppBar or taskbar. The system maintains information about each taskbar and notifies them when an event affects the taskbar size, position, and appearance.

 

Sending messages

Send message

 

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.

An application uses a set of messages called AppBar messages to add or delete An appbar application and set the size and position of the AppBar, receives the size, position, and status information about the AppBar. The application uses the shappbarmessage function to send the AppBar message. This function contains two parameters: one is the message identifier (such as abm_new) and the other is the address of the structure appbardata. End

Body parameters include the information of messages to be processed by the system.

 

For any given AppBar message, the system uses some members of the appbardata structure and ignores the others. however, the system always uses the cbsize and hwnd members, so 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 to the appbar's window.

For any given AppBar message, the system only uses some parameters of the structure appbardata and ignores other parameters. However, the cbsize and hwnd parameters are always used, therefore, the application needs to fill these two parameters with each AppBar message. The cbsize parameter indicates the size of the struct. hwnd indicates the window handle of the AppBar.

 

Some AppBar messages request information from the system. When processing these messages, the system copies the requested information into the appbardata structure.

Some AppBar messages can be obtained from the system. When processing these messages, the system copies the required information to the structure appbardata.

Application desktop toolbars desktop toolbar (2)

 
Note:

Shappbarmessage

Winshellapi uint apientry shappbarmessage (

DWORD dwmessage,

Pappbardata pdata

);

Sends An appbar message to the system.

Sends An appbar message to the system.

 

L returns a message-dependent value. For more information, see the Microsoft platform SDK documentation for the AppBar message sent.

The returned value is determined by the message. Different messages return different values. For more information, see the AppBar message sent section in the Microsoft platform SDK documentation.

 

Dwmessage

Parameter 1: dwmessage

AppBar message value to send. This parameter can be one of the following values:

The value of the message to be sent. This parameter can be any one in the following list:

 

Abm_activate notifies the system that An appbar has been activated.

Activate An appbar.

Abm_getautohidebar retrieves the handle to the autohide AppBar associated

A participating edge of the screen.

Obtain a handle that automatically hides the AppBar associated with the screen edge.

Abm_getstate retrieves the autohide and always-on-top states of

Windows taskbar.

Obtain the automatically hidden status of the task bar, which is always in the top attribute.

Abm_gettaskbarpos retrieves the bounding rectangle of the Windows taskbar.

Obtain the size of the task bar.

Abm_new registers a new AppBar and specifies the message identifier

That the system shocould use to send notification messages

To the AppBar.

Register An appbar and specify the message identifier (used to send notifications to the AppBar ).

Abm_querypos requests a size and screen position for An appbar.

Obtain the AppBar size and position on the screen.

Abm_remove unregisters An appbar, removing the bar from the system's

Internal list.

Unregister An appbar and remove it from the system list.

Abm_setautohidebar registers or unregisters an autohide AppBar for an edge

The screen.

Register or deregister an automatically hidden AppBar for an edge of the screen.

Abm_setpos sets the size and screen position of An appbar.

Set the AppBar size and position on the screen.

Abm_windowposchanged notifies the system when An appbar's position has

Changed.

The location of An appbar in the notification system has changed.

 

Pdata

Parameter 2: pdata

Address of an appbardata structure. The content of the structure depends on the value set in the dwmessage parameter.

The address of the struct appbardata. The struct content depends on the dwmessage parameter settings.

 


Application desktop toolbars desktop toolbar (3)

 

Appbardata

Typedef struct _ appbardata {

DWORD cbsize;

Hwnd;

Uint ucallbackmessage;

Uint uedge;

Rect RC;

Lparam;

} Appbardata, * pappbardata;

 

Contains information about a system AppBar message. This structure is used with the shappbarmessage function.

The information contained in the AppBar message. This struct is used by the shappbarmessage function.

 

Cbsize: contains the size of the structure, in bytes.

The struct size in bytes.

Hwnd: contains the handle to the AppBar window.

AppBar window handle.

Ucallbackmessage: application-defined message identifier. The application

Uses the specified identifier for notification messages

That it sends to the AppBar identified by the hwnd member.

This member is used when sending the abm_new message.

The message identifier defined by the application. The application uses this flag to send notifications

To the AppBar specified by hwnd.

Uedge: value that specifies an edge of the screen. This member can

Be one of the following values:

The edge of the specified screen. This parameter can be any of the following values:

Abe_bottom bottom edge.

Abe_left left edge.

Abe_right right edge.

Abe_top top edge.

This member is used when sending the abm_getautohidebar,

Abm_querypos, abm_setautohidebar, and abm_setpos

Messages.

This parameter is only valid when sending abm_getautohidebar, abm_querypos,

Use abm_setautohidebar and abm_setpos messages.

RC: rect structure to contain the bounding rectangle, in screen

Coordinates, of An appbar or the Windows taskbar. This

Member is used when sending the abm_gettaskbarpos,

Abm_querypos, and abm_setpos messages.

Structure rect specifies the area of the AppBar or window taskbar. This parameter is only available in

Send abm_gettaskbarpos, abm_querypos, and abm_setpos.

Lparam: Message-dependent value. This member is used with

Abm_setautohidebar message.

A message-dependent value. This parameter is only valid when the abm_setautohidebar is sent.

.


 

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.