My program need to print a curve,
my solution is changing the curve into a picture,
and this picture file (xxx.png) can be printed by using the default windows picture print
rundll32 C:\WINDOWS\system32\shimgvw.dll,ImageView_PrintTo "c:\mydir\my.bmp" "Fictional HP Printer"
This prints an image file (.png in my case) to a specified printer WITHOUT a dialog box popping up. Also... works without elevated command prompt privileges.