Click here to Skip to main content
Click here to Skip to main content

Print Previewing without the Document/View Framework

By , 26 Nov 1999
 

Sample Image

Introduction

Thanks to Chris Maunder for introducing the printing method in Printing without the Document/View framework. Many people have been asking for print preview without the doc/view framework as well. However, so far, no body has proposed a way to do that yet. I have studied on how Microsoft implements print preview in doc/view framework using the class CPreviewView, which is derived from CSrollView. The print preview is called from CView::OnFilePrintPreview( ) and CView::DoPrintPreview. They are undocumented, the source code can be found from VC\mfc\src\Viewprev.cpp. The implementation relies on CView and CFrameWnd framework extensively.

In order to use the default print preview functionality in non doc/view framework, like dialog based applications, I played a trick by creating temporary CFrameWnd and CView objects and then calling the default OnFilePrintPreview( ) from the temporary view class. I borrowed Chris Maunder's CGridCtrl control from MFC Grid control (derived from CWnd) article as an example to illustrate the implementation. I included another demo project, which was modified from Iuri Apollonio's article: Generic printing class (and how to print a list control content). The code was developed under VC5 environment and has been tested in Windows 98 and NT platforms without any problem. :)

How to use

Add a function PrintPreview( ) in your control class (CGridCtrl in this case) or the class where you put your OnBeginPrinting, OnPrint, etc. Also, add two member variables to the class and initialize them:

// In your header file /////////////
private:
    CSingleDocTemplate* m_pTemplate;
public:
    BOOL m_bPrintPreview;
    void PrintPreview();
////////////////////////////////////

// In your class constructor ///////
#include "ViewPrintPreview.h"

CGridCtrl::CGridCtrl(...)
{
    // Add initialization
    m_pTemplate=NULL;
    m_bPrintPreview=FALSE;
}
////////////////////////////////////

// In your class ///////////////////
void CGridCtrl::PrintPreview()
{
    if (m_bPrintPreview)
    {
        AfxGetApp()->m_pMainWnd->SetFocus();
        return;
    }

    CFrameWnd* pOldFrame=(CFrameWnd*)AfxGetThread()->m_pMainWnd;
    pOldFrame->ShowWindow(SW_HIDE); //added by eric

    if (!m_pTemplate)
    {
        m_pTemplate = new CSingleDocTemplate(
            IDR_MENU,
            NULL,
            RUNTIME_CLASS(CFrameWnd),
            RUNTIME_CLASS(CViewPrintPreview));
        AfxGetApp()->AddDocTemplate(m_pTemplate);
    }

    CFrameWnd * pFrameWnd = m_pTemplate->CreateNewFrame( NULL, NULL );
    m_bPrintPreview=TRUE;

    m_pTemplate->InitialUpdateFrame( pFrameWnd, NULL, FALSE);

    CViewPrintPreview* pView=(CViewPrintPreview*)pFrameWnd->GetActiveView();
    pView->m_pCtrl=this;
    pView->m_pOldFrame=pOldFrame;

    AfxGetApp()->m_pMainWnd=pFrameWnd;
    pFrameWnd->SetWindowText(_T("Koay Kah Hoe Print Preview"));
    pFrameWnd->ShowWindow(SW_SHOWMAXIMIZED);
    pView->OnFilePrintPreview();
}

A CSingleDocTemplate object is used to create a frame and a view window. The view class CViewPrintPreview has no chance to show itself, as it is suppressed by preview view immediately. The m_pMainWnd pointer is changed to the new CFrameWnd so that the preview class can use it as parent frame. (Has any one done this before?) The original m_pMainWnd is saved in the view class, when preview is ended, it will restore the pointer back to the original value. Then, OnFilePrintPreview is called.

Add the view class CViewPrintPreview and its header file to the project. The main job of the view class is to pass the printing functions OnBeginPrinting, OnPrint and OnEndPrinting to the control class or wherever you place them. This must be done through the view class as the print preview calls these functions from view class. When the preview window is closed, the program must restore the m_pMainWnd pointer back to its original value. Then, the frame and view window must be destroyed. This is done in the function OnEndPrintPreview.

Now, you can view the preview window already. However, this is not the end of the story yet, the toolbar buttons cannot update themselves as normally they should be. After some investigation, I found that the window normally calls the message WM_IDLEUPDATECMDUI to update the toolbar's state from the OnIdle function in SDI or MDI application. For dialog based applications, the OnIdle function is not called. Thus, the message WM_IDLEUPDATECMDUI is not sent to update toolbar. We have to send the message ourselves. I overrode the virtual function ContinueModal( ) in the main dialog class, to do the job. You must include the header file AfxPriv.h in order to recognize the WM_IDLEUPDATECMDUI message.

BOOL CGridCtrlDemoDlg::ContinueModal()
{
    if (m_Grid.m_bPrintPreview) // m_Grid is your control class
        // send WM_IDLEUPDATECMDUI message to update toolbar state
        // This is normally called by OnIdle function
        // in SDI or MSI applications.
        // Dialog based applications don't call OnIdle,
        // so send the message from here instead
        AfxGetApp()->m_pMainWnd->SendMessageToDescendants(WM_IDLEUPDATECMDUI,
            (WPARAM)TRUE, 0, TRUE, TRUE);

    return CDialog::ContinueModal();
}

Special precaution has to be taken when you use the print preview. As the m_pMainWnd pointer is pointed to the new frame window when doing preview, elsewhere in your application that uses this pointer could cause your program to crash. You can use the m_bPrintPreview as an indicator to determine which window the m_pMainWnd is pointed to.

FAQ on compilation using static library

In dialog based applications, the resource file for the print preview is not included. This problem can be solved by simply including the resource file afxprint.rc to your project file. Open your resource file as text explicitly, add the following line in TEXTINCLUDE 3 section below #include afxres.rc:

"#include ""afxprint.rc"" // printing/print preview resources\r\n"

At the end of the resource file, do the actual including again as follows, below #include afxres.rc:

#include afxprint.rc // printing/print preview resources

FAQ on print button in preview toolbar

When pressing the print button in preview toolbar, the ID_FILE_PRINT command message is sent. Thus, you must create a message handler to the ID_FILE_PRINT message at your main dialog class, or wherever the message could be caught.

Add a line like below in the message map of your dialog class

BEGIN_MESSAGE_MAP(CMyDlg, CDialog) 
//{{AFX_MSG_MAP(CMyDlg) 
... 
//}}AFX_MSG_MAP 
ON_COMMAND(ID_FILE_PRINT, OnFilePrint) 
END_MESSAGE_MAP()

Then of course, you must have the handler function OnFilePrint(). See the given example on how it is done.

In cases where there are more than one printing function in the application, but there is only one general ID_FILE_PRINT message, special processing is needed to ensure that the correct printing function is called. There are two possible solutions. The first way is to use a variable identifying which printing should take place. The message handler should refer to this variable to call the correct printing function. The other way is to reroute the message mapping by overriding OnCmdMsg(). Each printable dialog or control has its own message handler for ID_FILE_PRINT. When a particular dialog or control is active, the message should be routed to the active dialog or control first.

Finally, I wish you happy previewing! :)

ViewPrintPreview header file

#if !defined(AFX_VIEWPRINTPREVIEW_H__137FC880_1607_11D3_9317_8F51A5F9742F__INCLUDED_)
#define AFX_VIEWPRINTPREVIEW_H__137FC880_1607_11D3_9317_8F51A5F9742F__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// ViewPrintPreview.h : header file
//

#include "GridCtrl.h"

/////////////////////////////////////////////////////////////////////////////
// CViewPrintPreview view

class CViewPrintPreview : public CView
{
protected:
    CViewPrintPreview(); // protected constructor used by dynamic creation
    DECLARE_DYNCREATE(CViewPrintPreview)

// Attributes
public:
    CGridCtrl *m_pCtrl;
    CFrameWnd *m_pOldFrame;

// Operations
public:
    virtual void OnFilePrintPreview();

// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CViewPrintPreview)
    protected:
    virtual void OnDraw(CDC* pDC);      // overridden to draw this view
    virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
    virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
    virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
    virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
    virtual void OnEndPrintPreview(CDC* pDC, 
       CPrintInfo* pInfo, POINT point, CPreviewView* pView);
    //}}AFX_VIRTUAL


// Implementation
protected:
    virtual ~CViewPrintPreview();
#ifdef _DEBUG
    virtual void AssertValid() const;
    virtual void Dump(CDumpContext& dc) const;
#endif

    // Generated message map functions
protected:
    //{{AFX_MSG(CViewPrintPreview)
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional
// declarations immediately before the previous line.

#endif 
//!defined(AFX_VIEWPRINTPREVIEW_H__137FC880_1607_11D3_9317_8F51A5F9742F__INCLUDED_)

ViewPrintPreview implementation file

// ViewPrintPreview.cpp : implementation file
//

#include "stdafx.h"
#include "ViewPrintPreview.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CViewPrintPreview

IMPLEMENT_DYNCREATE(CViewPrintPreview, CView)

CViewPrintPreview::CViewPrintPreview()
{
    m_pOldFrame=NULL;
}

CViewPrintPreview::~CViewPrintPreview()
{
}


BEGIN_MESSAGE_MAP(CViewPrintPreview, CView)
    //{{AFX_MSG_MAP(CViewPrintPreview)
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CViewPrintPreview drawing

void CViewPrintPreview::OnDraw(CDC* pDC)
{
    CDocument* pDoc = GetDocument();
    // TODO: add draw code here
}

/////////////////////////////////////////////////////////////////////////////
// CViewPrintPreview diagnostics

#ifdef _DEBUG
void CViewPrintPreview::AssertValid() const
{
    CView::AssertValid();
}

void CViewPrintPreview::Dump(CDumpContext& dc) const
{
    CView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CViewPrintPreview message handlers

void CViewPrintPreview::OnFilePrintPreview()
{
    CView::OnFilePrintPreview();
}

BOOL CViewPrintPreview::OnPreparePrinting(CPrintInfo* pInfo) 
{
    return DoPreparePrinting(pInfo);
}

void CViewPrintPreview::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo) 
{
    m_pCtrl->OnBeginPrinting(pDC, pInfo);
}

void CViewPrintPreview::OnPrint(CDC* pDC, CPrintInfo* pInfo) 
{
    m_pCtrl->OnPrint(pDC, pInfo);
}

void CViewPrintPreview::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo) 
{
    m_pCtrl->OnEndPrinting(pDC, pInfo);
}

void CViewPrintPreview::OnEndPrintPreview(CDC* pDC, 
      CPrintInfo* pInfo, POINT point, CPreviewView* pView) 
{
    CView::OnEndPrintPreview(pDC, pInfo, point, pView);
    // Show the original frame
    m_pOldFrame->ShowWindow(SW_SHOW);
    // Restore main frame pointer
    AfxGetApp()->m_pMainWnd=m_pOldFrame;
    m_pCtrl->m_bPrintPreview=FALSE;
    // Kill parent frame and itself
    GetParentFrame()->DestroyWindow();
}

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Koay Kah Hoe
Malaysia Malaysia
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionPrint preview and print buttonmemberMaxMax1421 Jul '12 - 6:07 
I tried the modification posted to avoid crash when we press the print button on print preview windows.
It does not crash but there is no print.
 
I use visual studio 2008 version 9.0
 
-> Has someone any solution ?
GeneralPrint CommandmemberAdeel Mirza22 Feb '10 - 23:58 
There is a small problem with this application. The Print Preview is working fine, But when someone press the print button of the Print Preview Window, the application crashes instead of displaying the print dialog. How can this be resolved?? I am using this thing in one of my project.
Maverick

Generalprint previewmemberyunchol1 Oct '09 - 23:54 
Hello, Mr. Koay Kah Hoe.
 
I'm chinese.
 
Your program run on VC++6.0 correctly.
but don't complie and run on Visual studio 2008.
 
but I can't find error point.
 
Can you upgrade your program?
 
I'll wait your reply.
Smile | :)
Generalwrong focus after returning from preview modememberfbruender26 Nov '08 - 6:39 
I have an SDI application with some CDialog pop up windows. In the CDialog windows I have integrated the Print and Preview functions as described here. It's working fine, great stuff !! But when I close the Preview window the focus is on the frame of the SDI application and NOT on the CDialog window from where I have triggered the Preview window. What am I doing wrong? Any help is appreciated.
GeneralBug fix at the end of CPrinterJob::OnPrepareDC(...)memberChristoph Conrad3 Sep '07 - 5:54 
The following code should be added so that the correct mappings of pixels
is ensured:
 
// Map logical unit of screen to printer unit
pDC->SetMapMode(MM_ANISOTROPIC);
CClientDC dcScreen(NULL);
int a = dcScreen.GetDeviceCaps(LOGPIXELSX);
int b = dcScreen.GetDeviceCaps(LOGPIXELSX);
pDC->SetWindowExt(a,b);
a = pDC->GetDeviceCaps(LOGPIXELSX);
b = pDC->GetDeviceCaps(LOGPIXELSX);
pDC->SetViewportExt(pDC->GetDeviceCaps(LOGPIXELSX),
pDC->GetDeviceCaps(LOGPIXELSX));

GeneralRe: Bug fix at the end of CPrinterJob::OnPrepareDC(...)memberChristoph Conrad3 Sep '07 - 20:54 
Correction: map correctly x/y, not only x
 
// Map logical unit of screen to printer unit
pDC->SetMapMode(MM_ANISOTROPIC);
CClientDC dcScreen(NULL);
int dpiX = dcScreen.GetDeviceCaps(LOGPIXELSX);
int dpiY = dcScreen.GetDeviceCaps(LOGPIXELSY);
pDC->SetWindowExt( dpiX, dpiY );
dpiX = pDC->GetDeviceCaps(LOGPIXELSX);
dpiY = pDC->GetDeviceCaps(LOGPIXELSY);
pDC->SetViewportExt( dpiX, dpiY );

GeneralMenuBars /toolbars / control bar state modified when close print previewmembernbarbedette22 Aug '06 - 5:03 
Hi everybody.
 
I've got a problem with my MDI application.
 
When I close my print preview view, my old main frame is not correctly displayed (furthermore, there is a crash in Debug mode).
 
Indeed, the state of all bars in the frame (tool, menu, control bars) has changed.
 
Does anybody know the reason of this problem whereas I overrided OnSize() method of the frame and where I replace the bars according to their size ?
GeneralRe: MenuBars /toolbars / control bar state modified when close print previewmembernbarbedette23 Aug '06 - 0:31 
I've partly resolved the problem by implementing OnShowWindow() message/method in which I do the same re-adjustment of the interface than in OnSize() method. But it's not really proper because I don't get the same size of the frame than in OnSize(type, cx, cy) method.
 
I use a local CRect rectFrame variable that I initialize with getWindowRect() and I get the size by rectFrame.Size().
 
It works but I am not really carried away with it.
 
Youriiiiiiiiiii !!!!!!!!!!!!!!
Questionhow to able the button "prev" and "zoom out"membersohori26 Mar '06 - 15:59 
hi,
Your program is very helpful to me. thank you.
But I have one problem.
 
In your program, "Previous" and "Zoomout" button in preview window are alble.
but these button in my program are disable.
 
If I push the "next" button, then the "Prev" button should be abled. but isn't.
 
Sorry, I do not very well english.
 
please how to able the button "prev" and "zoom out".
why don't you email me?
"sohori27@empal.com" or "sohori27@hotmail.com"
 
thank you.

QuestionCrash after print previewmemberchris17522 Mar '06 - 5:48 
This code does work only if you call print preview from the main dialog of the application. I created my own print dialog since I have have trouble setting the number of copies with CPrintDialog. Anyway I wanted to put this print preview button on my print dialog. I was able to bring up the print preview but the program would crash every time I tried to close it because a failure was occurring in CDialogs DoModal function....
int CDialog::DoModal()
{
	// can be constructed with a resource template or InitModalIndirect
	ASSERT(m_lpszTemplateName != NULL || m_hDialogTemplate != NULL ||
		m_lpDialogTemplate != NULL);
 
	// load resource as necessary
	LPCDLGTEMPLATE lpDialogTemplate = m_lpDialogTemplate;
	HGLOBAL hDialogTemplate = m_hDialogTemplate;
	HINSTANCE hInst = AfxGetResourceHandle();
	if (m_lpszTemplateName != NULL)
	{
		hInst = AfxFindResourceHandle(m_lpszTemplateName, RT_DIALOG);
		HRSRC hResource = ::FindResource(hInst, m_lpszTemplateName, RT_DIALOG);
		hDialogTemplate = LoadResource(hInst, hResource);
	}
	if (hDialogTemplate != NULL)
		lpDialogTemplate = (LPCDLGTEMPLATE)LockResource(hDialogTemplate);
 
	// return -1 in case of failure to load the dialog template resource
	if (lpDialogTemplate == NULL)
		return -1;
 
	// disable parent (before creating dialog)
	HWND hWndParent = PreModal();
	AfxUnhookWindowCreate();
	BOOL bEnableParent = FALSE;
	if (hWndParent != NULL && ::IsWindowEnabled(hWndParent))
	{
		::EnableWindow(hWndParent, FALSE);
		bEnableParent = TRUE;
	}
 
	TRY
	{
		// create modeless dialog
		AfxHookWindowCreate(this);
		if (CreateDlgIndirect(lpDialogTemplate,
						CWnd::FromHandle(hWndParent), hInst))
		{
			if (m_nFlags & WF_CONTINUEMODAL)
			{
				// enter modal loop
				DWORD dwFlags = MLF_SHOWONIDLE;
				if (GetStyle() & DS_NOIDLEMSG)
					dwFlags |= MLF_NOIDLEMSG;
(Failure Here Line 539)--->		VERIFY(RunModalLoop(dwFlags) == m_nModalResult);
			}
 
Anyway So I put an OnCancel call right after the following and it works...
	AfxGetApp()->m_pMainWnd=pFrameWnd;
	pFrameWnd->SetWindowText(_T("Koay Kah Hoe Print Preview"));
 
	pFrameWnd->ShowWindow(SW_SHOWMAXIMIZED);
 
	pView->OnFilePrintPreview();	
 
	OnCancel();
 
Is there any way to bring up the sub window in the application without trying to bring up the main window?
 
Chris
GeneralGridLinesmembermrlp103 Feb '06 - 5:50 
Hi all,
 
Can someone tell me if is possible eliminate the grid lines of report ?
 
Thanks,
 
Luis Alberto
GeneralCompile problemmemberMSS-Software7 Nov '05 - 23:29 
Hello together.
 
There was a problem with compiling my application. I included all the files it needs. If compiling following message is called:
 

CZeichen const * cannot convert to CGrid Ctrl *
 
the error is at this line
 
pView->m_pCtrl=this;
 
CZeichnen is my class, where I drawing an image which I want to print with this methode of print preview
GeneralRe: Compile problemmemberjani0114 Aug '07 - 1:20 
Is there a soultion for this
I have same problem
 

 

GeneralRe: Compile problemmemberChristoph Conrad3 Sep '07 - 20:59 
Your class CZeichen must inherit from CPrinterJob:
 
class CZeichen: public foo, public bar, public CPrinterJob
{
...
GeneralProgram crashesmemberKrishna Kumar N3 Nov '05 - 21:59 
I change Shared DLL to Static in Project Setting, the program
crashes
 
regards
KK
Generalprint preview specific pagemembergeorgeser16 Aug '05 - 21:14 
I have a windows application and I want to print a form with print preview.
Here I have 3 pages and I want to print only the 2nd page
How can I found the page number that I want to print.
 
The event that is raised when I click the print button from the form:
private void btnESPrint_Click(object sender, System.EventArgs e)
{
if (CheckExpenseSheetGrid())
{
try
{
printAditionalDocument.DefaultPageSettings.Landscape = true;

PrintPreviewDialog dlgAditionalPrint = new PrintPreviewDialog();

dlgAditionalPrint.Height = 768;
dlgAditionalPrint.Width = 1024;
dlgAditionalPrint.Document = printAditionalDocument;
dlgAditionalPrint.ScrollControlIntoView(btnESPrint);
if (dlgAditionalPrint.ShowDialog() == DialogResult.OK)
{
printAditionalDocument.Print();
}
grdExpenseSheet.Parent = tsExpenseSheet;
grdExpenseSheet.Visible=true;
grdExpenseSheet.Refresh();
}
 
}
 
The event that raise when I clicked print in print preview :
 
private void printAditionalDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
PrinterResolution pr = e.PageSettings.PrinterResolution;
if(pagePrintTest == 0)
DrawForm(e.Graphics, pr.X, pr.Y);
if(pagePrintTest < 3)
e.HasMorePages = true;
else
e.HasMorePages = false;
if(pagePrintTest > 0)
DrawAditionalForm(e.Graphics, pr.X, pr.Y, pagePrintTest);
grdExpenseSheet.Parent = tsExpenseSheet;
grdExpenseSheet.Visible=true;
grdExpenseSheet.Refresh();
//3 nr de pagini cu aditional vouchers
if(pagePrintTest < 3)
pagePrintTest++;
}
 

GeneralBrief overview of the control....sussTuPacMansur16 Jun '05 - 16:57 
this is a good control... but it needs a lot of polishing... i spent almost 5 hours with it and fixed it for the MFC Grid control.
 
if i ever get time, ima upload my code and a new article
 
Regards,
Umer
http://111k.blogspot.com
 
Muhammad U Mansoor
Generaldisable Print button on Preview dialogmemberZoltan31 May '05 - 12:41 
Hy,
 
I have also problem with printing.
It would be a nice solution for me, if I could disable this button!
 
Does anybody have a nice code for it? Smile | :)
 
Regards,
Zoltan
GeneralRe: disable Print button on Preview dialogsussTuPacMansur16 Jun '05 - 16:45 
All you have to do is import following file in your application: MFCATL\INCLUDE\AFXPRINT.RC and then copy AFX_IDD_PREVIEW_TOOLBAR dialog to your own resource. then remove the AFXPRINT.RC from your project (* do not save changes *). u can then play around with the resource, adding, removing, whatever u like.
 
Also, you should remove #include AFXPRINT.RC from your resource includes.
 
I wish this'll help.
Umer
 
Muhammad U Mansoor
GeneralRe: disable Print button on Preview dialogmemberZoltan10 Jul '05 - 12:35 
THX it is working!Big Grin | :-D
 
Zoltan
QuestionRe: disable Print button on Preview dialogmemberskyramesh6 Oct '07 - 19:30 
Hi,
 
I want briefly know that your idea about disable or remove the buttons in afxprint.rc in my application...
 
I dont know how can i copy the AFX_IDD_PREVIEW_TOOLBAR doalog to in my rource..
 
plz help me is very urgent for me.
 
Your idea good i was follows ur thought lastly i want remove the close button from toolbar...
 
How can i remove close button as well as nextpage button and prevpage,two page button.

Generalwhy CViewPrintPreview directly catch the ID_FILE_PRINTmembersunshimin31 Jan '05 - 22:01 
why can CViewPrintPreview directly catch the ID_FILE_PRINT ?if this is true we can save more time.
GeneralCursormembermkauma8 Dec '04 - 11:46 
I've been able to get everything working correctly in the print preview except I get no cursor when I move the mouse over the area where the page is being displayed. Does anyone know why this might be? In the example here on the web the cursor changes to a magnifing glass and everything, but I don't even get the arrow.
GeneralRe: CursormemberUMER91116 Jun '05 - 16:50 
Create a new cursor resource and put a magnifying cursor with the following resource ID: AFX_IDC_MAGNIFY
 
this should work!
 
Umer
 
Muhammad U Mansoor
Questionhow to implement more than one printing functionsussparrotlabelca3 Sep '04 - 18:56 
I still don't know how to implement the more than one printing fuction in the application. Some body can give me more detail by using those two methods?
thanks a lot

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

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 27 Nov 1999
Article Copyright 1999 by Koay Kah Hoe
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid