Buttons 區段

[與此頁面相關聯的功能Windows 媒體播放機 SDK是舊版功能。 它已被 MediaPlayer 取代MediaPlayer已針對Windows 10和Windows 11進行優化。 Microsoft 強烈建議新程式碼盡可能使用MediaPlayer,而不是Windows 媒體播放機 SDK。 Microsoft 建議盡可能重寫使用舊版 API 的現有程式碼,以使用新的 API。]

接下來,您必須定義將使用的按鈕:

[ Buttons ]

//  <Function> <Type>     <Location>     <Push Image Src>  <Dis Image Src>    <Hit R,G,B>  <Norm 2 Image Src>  <Push 2 Image Src>
//  ---------- ------     ----------     ----------------  ---------------    -----------  ------------------  ------------------
    PlayPause  2PushHit   100,20,110,100 Pushed @ 100,20   Disabled @ 100,20    0,255,255  Pushed @ 270,20     Pushed @ 270,130
    Stop       PushHit    20,20,45,45    Pushed @ 20,20    Disabled @ 20,20   255,255,  0
    Next       PushHit    20,80,45,45    Pushed @ 20,80    Disabled @ 20,80   255,  0,  0
    Prev       PushHit    20,140,45,45   Pushed @ 20,140   Disabled @ 20,130    0,  0,255

本節中定義了四個按鈕。 您檢視的頁面可能會換行這些行,但當您在程式碼中輸入時,不得換行行;也就是說,每一行都必須完成,並以段落標記結尾。

注意

按鈕類型在 Windows 媒體播放機 10 行動裝置版或更新版本的面板中已被取代。 您不需要在面板檔案中宣告的按鈕類型,而是針對每個類型輸入 「NA」。

 

針對每個按鈕,您必須針對點擊類型按鈕定義函式、類型、位置、推送的影像來源、停用的來源和色彩 () 。 此外,針對 PlayPause 按鈕,您必須定義暫停狀態的一般和推送影像來源。

如需面板定義檔案的 Buttons 區段的詳細資訊,請參閱面板參考中的 按鈕

撰寫程式碼