日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Application Desktop Toolbars 桌面工具栏

發布時間:2025/3/20 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Application Desktop Toolbars 桌面工具栏 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Application Desktop Toolbars 桌面工具欄(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.


? ? 桌面工具欄(也稱作appbar)是類似微軟視窗系統的任務條的窗口。它緊靠屏幕邊緣,典型的桌面工具欄包括快速訪問其他應用程序和窗口的按鈕。系統會防止其他應用程序使用被appbar占用的區域。在任何時刻桌面都可以同時共存多個appbar。


?


About Application Desktop Toolbars


桌面工具欄簡介


?


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 notify them about events that can affect their size, position, and appearance.


? ? 微軟視窗提供了一個應用編程接口(API)以方便你利用appbar service的特長。這些服務可以確保應用程序定義的appbar和其他appbar或任務欄之間進行協調工作。系統會維護每一個taskbar的信息,并且在有影響taskbar尺寸、位置和外觀等事件發生時,系統會通知他們。


?


Sending Messages


發送消息


?


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.


? ? 應用程序使用一組特殊稱作appbar messages的消息集合,利用這些消息,可以增加、刪除appbar應用,設置appbar的尺寸、位置,接收有關appbar的尺寸、位置消息以及任務欄的狀態信息。應用程序使用SHAppBarMessage函數發送appbar message,這個函數包含兩個參數,一個是消息標識符(如:ABM_NEW),另一個是結構體APPBARDATA的地址。結


構體參數包括系統需要處理的消息的信息。


?


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.


? ? 對任何給定的appbar message,系統只是采用結構體APPBARDATA的部分參數而忽略其他參數,但是cbSize和hWnd這兩個參數總是要使用的,因此應用程序要為每個appbar message填充這兩個參數。CbSize參數指明結構體的大小,hWnd代表appbar的窗口句柄。


?


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


? ? 有一些appbar message可以從系統獲取信息,在處理這些消息的時候,系統會將需要的信息拷貝到結構體APPBARDATA中去。

Application Desktop Toolbars 桌面工具欄(2)


?
注釋:


? ? SHAppBarMessage


WINSHELLAPI UINT APIENTRY SHAppBarMessage(


? ? ? ? ? ? ? ? ? ? ? ? DWORD dwMessage,


? ? ? ? ? ? ? ? ? ? ? ? PAPPBARDATA pData


);


? ?


Sends an appbar message to the system.


向系統發送appbar message。


?


l ? ? ? ? Returns a message-dependent value. For more information, see the Microsoft Platform SDK documentation for the appbar message sent.


返回值由消息決定,不同的消息返回不同的值。如果需要了解更多的信息,可以參看Microsoft Platform SDK文檔的appbar message sent部分。


?


dwMessage


參數一:dwMessage


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


將要發送的消息值,這個參數可以是下面列表中的任一個:


?


ABM_ACTIVATE ? ? Notifies the system that an appbar has been activated.


? ? ? ? ? ? ? ? ? ? 激活一個appbar。


ABM_GETAUTOHIDEBAR ? ?Retrieves the handle to the autohide appbar associated with


?        a particular edge of the screen.?


        獲得和屏幕邊緣關聯的一個自動隱藏appbar的句柄。


ABM_GETSTATE ? ? ? ? Retrieves the autohide and always-on-top states of the


Windows taskbar.


獲得任務條的自動隱藏、總在最上面屬性的狀態。


ABM_GETTASKBARPOS ? ? ?Retrieves the bounding rectangle of the Windows taskbar.


          獲得任務條的尺寸。


ABM_NEW ? ? ? ? ? ? ?Registers a new appbar and specifies the message identifier


that the system should use to send notification messages


to the appbar.?


注冊一個appbar并指定消息標識符(給appbar發送通知用)。


ABM_QUERYPOS ? ? ? ? Requests a size and screen position for an appbar.?


          取得appbar的尺寸和appbar在屏幕中的位置。


ABM_REMOVE ? ? ?Unregisters an appbar, removing the bar from the system's


internal list.


注銷appbar并從系統內部列表中移除該appbar。


ABM_SETAUTOHIDEBAR ? ? Registers or unregisters an autohide appbar for an edge of


the screen.?


給屏幕的一個邊緣注冊/注銷一個自動隱藏的appbar。


ABM_SETPOS ? ? ?Sets the size and screen position of an appbar.?


? ? ? ? ? ? ? ? ? ? 設置appbar的尺寸和appbar在屏幕中的位置。


ABM_WINDOWPOSCHANGED ? ? Notifies the system when an appbar's position has


changed.?


通知系統一個appbar的位置已經改變。


?


pData


參數二:pData


Address of an APPBARDATA structure. The content of the structure depends on the value set in the dwMessage parameter.


結構體APPBARDATA的地址。結構體的內容依賴于dwMessage參數的設置。


?

? ??
Application Desktop Toolbars 桌面工具欄(3)


?


APPBARDATA


typedef struct _AppBarData {


? ? DWORD ?cbSize;


? ? HWND ? hWnd;


? ? UINT ? uCallbackMessage;


? ? UINT ? uEdge;


? ? RECT ? rc;


? ? LPARAM lParam;


} APPBARDATA, *PAPPBARDATA;


?


Contains information about a system appbar message. This structure is used with the SHAppBarMessage function.


? ? appbar message所包含的信息。這個結構體供函數SHAppBarMessage使用。


?


cbSize: ? ? ? ? ? ?Contains the size of the structure, in bytes.


以字節形式表示結構體大小。


? ? hWnd: ? ? ? ? ? ? ?Contains the handle to the appbar window.


? ? ? ? ? ? ? ? ? ? ? ? appbar 窗口句柄。


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.


應用程序定義的消息標識符。應用程序使用該標志符發送通知消


息到由hWnd指定的appbar。


uEdge: ? ? ? ? ? ? Value that specifies an edge of the screen. This member can


be one 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.?


該參數只有在發送ABM_GETAUTOHIDEBAR、ABM_QUERYPOS、


ABM_SETAUTOHIDEBAR和ABM_SETPOS消息時使用。


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.?


結構體RECT指定appbar或視窗任務欄的區域。該參數只有在發


送ABM_GETTASKBARPOS、ABM_QUERYPOS、ABM_SETPOS時使用。


lParam: ? ? Message-dependent value. This member is used with the


ABM_SETAUTOHIDEBAR message.


一個依賴于消息的值。該參數只有在發送ABM_SETAUTOHIDEBAR


時使用。


? ?

總結

以上是生活随笔為你收集整理的Application Desktop Toolbars 桌面工具栏的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。