Why the printer setting is ignored?
I have the following in my code:
// header:
LPPRINTDLG m_pPD;
// cpp:
HANDLE m_hDevMode = m_pPD->hDevMode;
LPDEVMODE lpDevMode = (LPDEVMODE) m_hDevMode;
lpDevMode->dmPaperSize = 0;
lpDevMode->dmPaperLength = 50;
lpDevMode->dmPaperWidth = 100;
According to MSDN:
dmPaperSize : For printer devices only, selects the size of the paper to print on. This member can be set to zero if the length and width of the paper are both set by the dmPaperLength and dmPaperWidth members.
dmPaperLength : For printer devices only, overrides the length of the paper specified by the dmPaperSize member, either for custom paper sizes or for devices such as dot-matrix printers that can print on a page of arbitrary length. These values, along with all other values in this structure that specify a physical length, are in tenths of a millimeter.
dmPaperWidth : For printer devices only, overrides the width of the paper specified by the dmPaperSize member.
I set the dmPaperLength and dmPaperWidth because I am using a "dot-matrix printers that can print on a page of arbitrary length", just like the MSDN says. I am using a roll of paper for printing transaction receipt. My thought was that, if I know I am printing 5 lines, and 1 lines equals, let say 8 millimeter, then when I set the paper length to 6 cm, then the printer will only scroll 2 centimeter. But what always happen is that the printer always scroll for about (11 inches - total lines). What am I doing wrong here? I double checked the value upon destruction of the dialog, and values still hold.
I will really appreciate it, if someone can give me some direction on this. Thanks.

