but I need to be able to calculate the number of pages depending on whether the printer is set to portrait or landscape mode. This is where I have a problem since I cannot find out which mode the printer is in due to GetPrinterMode() needing a valid printer device context. I am therefore resorting to calculating the number of pages in the OnBeginPrinting() function.
Another question regarding this issue is how can I update the number of pages in the dialog when the user goes into properties and changes printer mode from portrait to landscape or vice-versa?
Any help with either of the above will be much appreciated.
SOMETIMES (only in the release NOT in the debug version) my program crashed, when i used the table-printing functions.
I "debugged" the problem in the release version, and saw, that the pTable->EndRow member wasn't at zero, but the pTable pointer was new, made with pTable = new TABLEHEADER
The fix for this problem was to add a line in the constructor of TABLEHEADER like