Anybody know why the following code doesn't print anything?
There is no error after calls to PrintDlg or StartDoc. This is puzzling. I read all the api help but still confusion reigns. Any links or samples to source code much appreciated.

mov pd.lStructSize,SIZEOF pd
push hWndList
pop ofn.hwndOwner
push hInstance
pop pd.hInstance
mov docifo.cbSize,SIZEOF docifo
mov docifo.lpszDocName,OFFSET szDocTitle
mov docifo.lpszOutput,OFFSET szOutFileName
mov docifo.fwType,NULL
invoke PrintDlg,ADDR pd
or eax,00h
jz @f
invoke StartDoc,pd.hDC,ADDR docifo

invoke EndDoc,pd.hDC
invoke DeleteDC,pd.hDC

best regards,

Posted on 2002-01-13 20:32:37 by czDrillard
It looks good to me, with a three small things of interest...

1) My working example uses offset instead of addr on: invoke PrintDlg,ADDR pd (should be an issue tho..)

2) I didnt play with so many flags. (again shouldnt matter)

3) I do StartPage following Start Doc... (which i dont see)

Here is my source. It works fine. (in case your wondering the code was written for an engineering application, so the output is all electrical jargin :) )

Hope it helps..
Posted on 2002-01-14 03:29:15 by NaN
Between Start - EndDoc...
You should organize a loop with StartPage ... End..
And inner loop wich should write text to printer as you do it
in window for example, ... may be done with TextOut for example
Posted on 2002-01-14 05:36:53 by The Svin
Nan, thanks for the attachment and Svin thanks for your suggestion. I'll try to use the information to put together a program that prints.
Btw, I'm wanting to print the urls listed in the index.dat files so I might be raising more questions on this same subject:)

best regards,

Posted on 2002-01-14 10:02:45 by czDrillard