Printing Class Library : Bottom Margin
-
There is a great printing class here: http://www.codeguru.com/cpp/w-p/printing/article.php/c2955/ I have used it along time. One problem I have, which is really driving me crazy, is that I have a standard 8.5 x 11 sheet of paper and cant print text past 10.5". I tried adjusting the SetBottomMargin() function to: pPage->SetBottomMargin(-1) pPage->SetBottomMargin(0); pPage->SetBottomMargin(11); but none of them work. The text just doesnt print if it is too low on the page. How can print text that is close to the edge of the paper using this class or not using this class? Please, any response any one can give me will be greatly appreciated. Sincerely, Danielle Brina (an overworked graduate student)
-
There is a great printing class here: http://www.codeguru.com/cpp/w-p/printing/article.php/c2955/ I have used it along time. One problem I have, which is really driving me crazy, is that I have a standard 8.5 x 11 sheet of paper and cant print text past 10.5". I tried adjusting the SetBottomMargin() function to: pPage->SetBottomMargin(-1) pPage->SetBottomMargin(0); pPage->SetBottomMargin(11); but none of them work. The text just doesnt print if it is too low on the page. How can print text that is close to the edge of the paper using this class or not using this class? Please, any response any one can give me will be greatly appreciated. Sincerely, Danielle Brina (an overworked graduate student)
hi, i suppose that it should be changed into double CPage::SetBottomMargin(double w) { int temp=m_PrtDesc.rc.bottom; if(w > 0) m_PrtDesc.rc.bottom=ConvertToMappedUnits(w,VERTRES); if(w==-1) m_PrtDesc.rc.bottom=m_PrtDesc.n_maxLength; //m_PrtDesc.rc.right=m_PrtDesc.n_maxLength; //previous line return ConvertToInches(temp,VERTRES); } and calling pPage->SetBottomMargin(-1); :cool: