[REBOL] Re: Printing
From: mattsmac::hotmail::com at: 12-Sep-2003 16:24
OK, Gregg, I found some stuff online that kindof says the same thing you
said the first time about using the external libraries. I'm not really
woried about the rendering right now, I just want to get the set-up right.
By combining you and their code I get:
rebol[]
print-lib: make library! %/c/windows/system32/comdlg32.dll
PRINTDLG: make struct! PRINTDLG-def: compose/deep [
lStructSize [integer!] ; DWORD
hwndOwner [integer!] ; HWND
hDevMode [integer!] ; HANDLE (NULL or pointer to
struct)
hDevNames [integer!] ; HANDLE (NULL or pointer to
struct)
hDC [integer!] ; HDC
Flags [integer!] ; DWORD
nFromPage [short] ; WORD
nToPage [short] ; WORD
nMinPage [short] ; WORD
nMaxPage [short] ; WORD
nCopies [short] ; WORD
hInstance [integer!] ; HINSTANCE
lCustData [integer!] ; DWORD
lpfnPrintHook [integer!] ; LPPRINTHOOKPROC (decl for NULL,
not struct)
lpfnSetupHook [integer!] ; LPSETUPHOOKPROC (decl for NULL,
not struct)
lpPrintTemplateName [string!] ; LPCTSTR
lpSetupTemplateName [string!] ; LPCTSTR
hPrintTemplate [integer!] ; HANDLE
hSetupTemplate [integer!] ; HANDLE
] none
PrintDlg: make routine! compose/deep/only [
; pointer to structure with initialization data
lppd: [struct! (LPPRINTDLG-def)] ;LPPRINTDLG
return: [integer!] ;BOOL
] print-lib "PrintDlg"
upon running that code , not that i expect it to do much by itself. I get
the following error.
** Script Error: LPPRINTDLG-def has no value
** Near: LPPRINTDLG-def
If i tweak it a little bit, I can get that error to go away, but then it
says it can't open PrintDlg
Any Ideas?
_________________________________________________________________
Fast, faster, fastest: Upgrade to Cable or DSL today!