button 元素
必要的 按鈕 元素會指定顯示在用戶端計算機上消息框中的按鈕特性。
按鈕元素定義在此 URI 的 asyncui 命名空間中:
https://schemas.microsoft.com/2003/print/asyncui/v1/request
某些語言和國家/地區可能無法使用此資源。
使用方式
<button
stringID = "xs:string"
resourceDll = "xs:string"
buttonID = "xs:string"/>
屬性
屬性 | 類型 | 必要 | Description |
---|---|---|---|
buttonID | xs:string | Yes | 必要屬性,指定當使用者按鍵時,將傳回印表機驅動程式的字串。 此屬性可以接受下列其中一個值: IDOK - 名稱為 「OK」 的按鈕會顯示在消息框中。 當使用者按鍵時,消息框會傳回字串 「IDOK」。。 IDCANCEL - 名稱為 “CANCEL” 的按鈕會顯示在消息框中。 當使用者按鍵時,消息框會傳回字串 「IDCANCEL」。。 |
resourceDll | xs:string | No | 選擇性屬性,指定要在按鈕上顯示之文字的資源 DLL。 此 DLL 應該是印表機驅動程式的相依檔案,而且必須存在於驅動程式資源資料夾中 (,例如 %SYSTEMROOT%\system32\spool\drivers\w32x86\3) 。 |
stringID | xs:string | Yes | 必要屬性,指定要顯示在按鈕上的文字。 屬性值會指定資源 DLL 中文字字串的位置。 |
子元素
沒有子元素。
父元素
元素 | Description |
---|---|
buttons | 必要元素,指定客戶端電腦上事件通知消息框中顯示的一或多個按鈕。 |
備註
按鈕會顯示在消息框底部。
範例
下列程式代碼範例示範如何使用 按鈕 元素來顯示彼此旁的 [確定 ] 和 [ 取消] 按鈕。
<?xml version="1.0" ?>
<asyncPrintUIRequest
xmlns="https://schemas.microsoft.com/2003/print/asyncui/v1/request">
<v1>
<requestOpen>
<messageBoxUI>
<title stringID="1234" resourceDll="IHV.dll" />
<body stringID="100" resourceDll="IHV.dll">
<parameter stringID="5" />
<parameter stringID="1002" resourceDll="IHV.dll" />
</body>
<buttons>
<button stringID="1" resourceDll="IHV.dll" buttonID="IDOK"/>
<button stringID="2" resourceDll="IHV.dll" buttonID="IDCANCEL"/>
</buttons>
</messageBoxUI>
</requestOpen>
</v1>
</asyncPrintUIRequest>