如何使用 NSIS 在许可协议安装程序屏幕上单击 "print" 时显示打印对话框 select 打印选项
How to show the print dilaog to select the option to print when clicked on "print" from the license agreement installer screen using NSIS
如何使用 NSIS 在许可协议安装程序屏幕上单击“打印”时显示打印对话框 select 打印选项。
我想在许可协议屏幕上单击“打印”时显示以下屏幕。
如果我使用下面的命令,它会直接打印页面,而不会弹出打印对话框。
没有内置支持,但可以通过系统插件显示common dialog:
!include LogicLib.nsh
!define /IfNDef PD_HIDEPRINTTOFILE 0x00100000
!define /IfNDef PD_NOSELECTION 0x00000004
!define /IFNDef PD_USEDEVMODECOPIESANDCOLLATE 0x00040000 ; Just one copy
Function ShowPrintDlg
System::Call '*(p0,p$hwndparent,p0,p0,p,i${PD_HIDEPRINTTOFILE}|${PD_NOSELECTION}|${PD_USEDEVMODECOPIESANDCOLLATE},&i2,&i2,&i2,&i2,&i2,p,p,p,p,p0,p0,p0,p0,&l.r0)p.r1'
System::Call '*(ir0)'
System::Call 'COMDLG32::PrintDlg(pr1)i.r0'
${If} [=10=] <> 0
System::Call '*(p,p,p.r3,p.r4,t""r2)'
System::Free
System::Call 'KERNEL32::GlobalFree(pr3)'
System::Call 'KERNEL32::GlobalLock(pr4)p.r1'
${If} P<> 0
System::Call '*(&i2,&i2.r2,&i2,&i2)'
System::Call '*(&i,&t999.r2)'
System::Call 'KERNEL32::GlobalUnlock(pr1)'
System::Call 'KERNEL32::GlobalFree(pr4)'
${EndIf}
MessageBox mb_ok 'User wants to print to ""'
${Else}
System::Free
${EndIf}
FunctionEnd
Page InstFiles
Section
Call ShowPrintDlg
SectionEnd
如何使用 NSIS 在许可协议安装程序屏幕上单击“打印”时显示打印对话框 select 打印选项。
我想在许可协议屏幕上单击“打印”时显示以下屏幕。
如果我使用下面的命令,它会直接打印页面,而不会弹出打印对话框。
没有内置支持,但可以通过系统插件显示common dialog:
!include LogicLib.nsh
!define /IfNDef PD_HIDEPRINTTOFILE 0x00100000
!define /IfNDef PD_NOSELECTION 0x00000004
!define /IFNDef PD_USEDEVMODECOPIESANDCOLLATE 0x00040000 ; Just one copy
Function ShowPrintDlg
System::Call '*(p0,p$hwndparent,p0,p0,p,i${PD_HIDEPRINTTOFILE}|${PD_NOSELECTION}|${PD_USEDEVMODECOPIESANDCOLLATE},&i2,&i2,&i2,&i2,&i2,p,p,p,p,p0,p0,p0,p0,&l.r0)p.r1'
System::Call '*(ir0)'
System::Call 'COMDLG32::PrintDlg(pr1)i.r0'
${If} [=10=] <> 0
System::Call '*(p,p,p.r3,p.r4,t""r2)'
System::Free
System::Call 'KERNEL32::GlobalFree(pr3)'
System::Call 'KERNEL32::GlobalLock(pr4)p.r1'
${If} P<> 0
System::Call '*(&i2,&i2.r2,&i2,&i2)'
System::Call '*(&i,&t999.r2)'
System::Call 'KERNEL32::GlobalUnlock(pr1)'
System::Call 'KERNEL32::GlobalFree(pr4)'
${EndIf}
MessageBox mb_ok 'User wants to print to ""'
${Else}
System::Free
${EndIf}
FunctionEnd
Page InstFiles
Section
Call ShowPrintDlg
SectionEnd