Click here to Skip to main content
16,006,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Scrolling problem Pin
Jeje31-Jan-02 23:12
Jeje31-Jan-02 23:12 
GeneralRe: Scrolling problem Pin
Joerg Wiedenmann1-Feb-02 0:23
Joerg Wiedenmann1-Feb-02 0:23 
QuestionWhy is the window always topmost? Pin
Fredrik Skog28-Jan-02 2:48
Fredrik Skog28-Jan-02 2:48 
AnswerRe: Why is the window always topmost? Pin
Joaquín M López Muñoz28-Jan-02 2:54
Joaquín M López Muñoz28-Jan-02 2:54 
AnswerRe: Why is the window always topmost? Pin
Carlos Antollini28-Jan-02 3:12
Carlos Antollini28-Jan-02 3:12 
GeneralRe: Why is the window always topmost? Pin
Fredrik Skog28-Jan-02 3:19
Fredrik Skog28-Jan-02 3:19 
GeneralChange the margins of the page Pin
Eugene Pustovoyt28-Jan-02 1:18
Eugene Pustovoyt28-Jan-02 1:18 
GeneralRe: Change the margins of the page Pin
Roger Allen29-Jan-02 1:39
Roger Allen29-Jan-02 1:39 
When you OnPrint handler is called, the printable area of the page is in the CPrintInfo objects member var m_rectDraw. Your OnPrint should use the values in this to decide wher to print on the page. To give yourself margins, setup a dialog that lets you enter the margin values, and then configure m_rectDraw at the start of the OnPrint procedure to take the margins into account:

// take the page margins into account when drawing on the page
// we also configure the m_rectDraw member to have the required offsets
// the values are in inches, we need to convert to pixels
int xl = (int)(pDC->GetDeviceCaps(LOGPIXELSX) * g_LeftMargin) ;
int xr = (int)(pDC->GetDeviceCaps(LOGPIXELSX) * g_RightMargin) ;
int yt = (int)(pDC->GetDeviceCaps(LOGPIXELSY) * g_TopMargin) ;
int yb = (int)(pDC->GetDeviceCaps(LOGPIXELSY) * g_BottomMargin) ;

// update the drawable rectangle
pInfo->m_rectDraw.left += xl ;
pInfo->m_rectDraw.right -= xr ;
pInfo->m_rectDraw.top += yt ;
pInfo->m_rectDraw.bottom -= yb ;


HTH


Roger Allen
Sonork 100.10016

If I'm not breathing, I'm either dead or holding my breath.
GeneralRe: Change the margins of the page Pin
Eugene Pustovoyt29-Jan-02 8:07
Eugene Pustovoyt29-Jan-02 8:07 
GeneralSave Client Area as Image Pin
syedhassan428-Jan-02 0:30
syedhassan428-Jan-02 0:30 
GeneralRe: Save Client Area as Image Pin
Rickard Andersson2028-Jan-02 0:53
Rickard Andersson2028-Jan-02 0:53 
GeneralRe: Save Client Area as Image Pin
Christian Graus28-Jan-02 1:00
protectorChristian Graus28-Jan-02 1:00 
GeneralRe: Save Client Area as Image Pin
Christian Graus28-Jan-02 1:04
protectorChristian Graus28-Jan-02 1:04 
GeneralInteracting with IE and other apps... Pin
Tommy Svensson28-Jan-02 0:16
Tommy Svensson28-Jan-02 0:16 
GeneralRe: Interacting with IE and other apps... Pin
Tommy Svensson28-Jan-02 2:13
Tommy Svensson28-Jan-02 2:13 
GeneralRe: Interacting with IE and other apps... Pin
Michael P Butler28-Jan-02 3:03
Michael P Butler28-Jan-02 3:03 
GeneralRe: Interacting with IE and other apps... Pin
Tommy Svensson28-Jan-02 3:08
Tommy Svensson28-Jan-02 3:08 
QuestionManually disabling selection highlight in CListCtrl? Pin
The_B27-Jan-02 23:58
The_B27-Jan-02 23:58 
AnswerRe: Manually disabling selection highlight in CListCtrl? Pin
Roger Allen29-Jan-02 1:44
Roger Allen29-Jan-02 1:44 
GeneralSerial Ports and Terminal Servers Pin
Steve Thresher27-Jan-02 23:52
Steve Thresher27-Jan-02 23:52 
GeneralVC Dll for DELPHI!!!! Pin
27-Jan-02 23:13
suss27-Jan-02 23:13 
GeneralRe: VC Dll for DELPHI!!!! Pin
Joaquín M López Muñoz27-Jan-02 23:20
Joaquín M López Muñoz27-Jan-02 23:20 
GeneralRe: VC Dll for DELPHI!!!! Pin
Paul M Watt27-Jan-02 23:34
mentorPaul M Watt27-Jan-02 23:34 
GeneralRe: VC Dll for DELPHI!!!! Pin
Paul M Watt27-Jan-02 23:28
mentorPaul M Watt27-Jan-02 23:28 
GeneralRe: VC Dll for DELPHI!!!! Pin
28-Jan-02 14:36
suss28-Jan-02 14:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.