How to Print the Text in Required Format.
-
hi all, i want to print the Contents of the Feilds of the Form into the Printer into the Required Alignment. my approach. CPringDialog dlg; dlg.DoModal(); CDC dc; dc.Attach(dlg.GetDC()) int h, v; h = dc.GetDeviceCaps(HORZRES); v = dc.GetDeviceCaps(VERTRES); dlg.BeginDocument(); dlg.BeginPrint(); dc.TextOut("Some Text"); //Printing towards the Printer. dlg.EndPrint(); dlg.EndDocument(); // This works fine but With GetDeviceCaps(...) i am getting the Horizontal and Verticals Coordinates of the Computer. But How to align Top,Width,Height,Bottom of the Page to Print in Correct Alignment. please help me out. thanks, uday. uday kiran
-
hi all, i want to print the Contents of the Feilds of the Form into the Printer into the Required Alignment. my approach. CPringDialog dlg; dlg.DoModal(); CDC dc; dc.Attach(dlg.GetDC()) int h, v; h = dc.GetDeviceCaps(HORZRES); v = dc.GetDeviceCaps(VERTRES); dlg.BeginDocument(); dlg.BeginPrint(); dc.TextOut("Some Text"); //Printing towards the Printer. dlg.EndPrint(); dlg.EndDocument(); // This works fine but With GetDeviceCaps(...) i am getting the Horizontal and Verticals Coordinates of the Computer. But How to align Top,Width,Height,Bottom of the Page to Print in Correct Alignment. please help me out. thanks, uday. uday kiran