Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Print Preview in Dialog

Print Preview in Dialog

Scheduled Pinned Locked Moved C / C++ / MFC
help
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shivarudrayya H
    wrote on last edited by
    #1

    Hi friends, I developed a dialog application. I want the content to be displayed in "Print Preview" view. I tried it by calling the OnFilePrintPreview() fn. But its aborting. Plz anybody help me out to solve the problem.. Thanks.

    Reagards Shiva

    N S 2 Replies Last reply
    0
    • S Shivarudrayya H

      Hi friends, I developed a dialog application. I want the content to be displayed in "Print Preview" view. I tried it by calling the OnFilePrintPreview() fn. But its aborting. Plz anybody help me out to solve the problem.. Thanks.

      Reagards Shiva

      N Offline
      N Offline
      Nelek
      wrote on last edited by
      #2

      PrintPreview is quite less problematic than printing in paper. BTW if you say that is aborting but you give wether the exact error nor a code snippet... it will be pretty difficult to help you. There are very good programmers here, but AFAIK there are no mediums or telepats in forum.

      Greetings. -------- M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson

      S 1 Reply Last reply
      0
      • S Shivarudrayya H

        Hi friends, I developed a dialog application. I want the content to be displayed in "Print Preview" view. I tried it by calling the OnFilePrintPreview() fn. But its aborting. Plz anybody help me out to solve the problem.. Thanks.

        Reagards Shiva

        S Offline
        S Offline
        santhoshv84
        wrote on last edited by
        #3

        Hi, This OnFilePrintPreview() is available in CView or VEditView. But u can`t use it directly in a Dialog. If you want you have to Create a Dialog with Print Preview Option, inherited from CDialog Class.

        Thanks and Regards. SANTHOSH V

        1 Reply Last reply
        0
        • N Nelek

          PrintPreview is quite less problematic than printing in paper. BTW if you say that is aborting but you give wether the exact error nor a code snippet... it will be pretty difficult to help you. There are very good programmers here, but AFAIK there are no mediums or telepats in forum.

          Greetings. -------- M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson

          S Offline
          S Offline
          Shivarudrayya H
          wrote on last edited by
          #4

          CFrameWnd* pFrameWnd=(CFrameWnd*)AfxGetThread()->m_pMainWnd; { CPrintPreviewView* pView=(CPrintPreviewView*)pFrameWnd->GetActiveView(); pView->OnFilePrintPreview(); } Now im getting the preview, but the prgm hangs.. whats the problem? :(

          Reagards Shiva

          N 1 Reply Last reply
          0
          • S Shivarudrayya H

            CFrameWnd* pFrameWnd=(CFrameWnd*)AfxGetThread()->m_pMainWnd; { CPrintPreviewView* pView=(CPrintPreviewView*)pFrameWnd->GetActiveView(); pView->OnFilePrintPreview(); } Now im getting the preview, but the prgm hangs.. whats the problem? :(

            Reagards Shiva

            N Offline
            N Offline
            Nelek
            wrote on last edited by
            #5

            I guess an unended bucle. Or a reiterative call to OnDraw without end. Or something like this... This code seems to be ok, can you show what you are doing to print contents in the preview?

            Greetings. -------- M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you “The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups