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. er the option of a MFC

er the option of a MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
11 Posts 4 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.
  • B Offline
    B Offline
    BRIMID
    wrote on last edited by
    #1

    I have written a program C++. I want to be able to give the user an option to print or print preview the putput or exe file. Are there any tutorials that explain how to create a page like this in MFC. I have a little idea but do not know how to enter my C++ code into the MFC template in order to create the complete program. Thank You all for all of your assistance.

    T 1 Reply Last reply
    0
    • B BRIMID

      I have written a program C++. I want to be able to give the user an option to print or print preview the putput or exe file. Are there any tutorials that explain how to create a page like this in MFC. I have a little idea but do not know how to enter my C++ code into the MFC template in order to create the complete program. Thank You all for all of your assistance.

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      REPOST ! :mad: and i'm not sure you want to print "exe files"... do you know what is exe files ? do you already opened a compiled file into a WYSIWYG editor (like notepad, ultraedit...) ???


      TOXCCT >>> GEII power
      [VisualCalc][toxcct]

      B 1 Reply Last reply
      0
      • T toxcct

        REPOST ! :mad: and i'm not sure you want to print "exe files"... do you know what is exe files ? do you already opened a compiled file into a WYSIWYG editor (like notepad, ultraedit...) ???


        TOXCCT >>> GEII power
        [VisualCalc][toxcct]

        B Offline
        B Offline
        BRIMID
        wrote on last edited by
        #3

        The exe file is what I get after I compile and build my program. I run it and out comes an exe file. The program perfroms exactly how I want it to. Now I want to be able to take my code and enter it into MFC so I will have a more functional program that give the user the option to print out the results. With the exe you can only view it. Of course they could maybe cut and paste but that is not to professional. Thank You

        M T D 3 Replies Last reply
        0
        • B BRIMID

          The exe file is what I get after I compile and build my program. I run it and out comes an exe file. The program perfroms exactly how I want it to. Now I want to be able to take my code and enter it into MFC so I will have a more functional program that give the user the option to print out the results. With the exe you can only view it. Of course they could maybe cut and paste but that is not to professional. Thank You

          M Offline
          M Offline
          Maximilien
          wrote on last edited by
          #4

          so, you have an executable (A) that when run will extract/generate another executable (B) ? and when you run B, you want it to be able to print what it displays ? if so, you need to reprogram B to handle the print process. Am I understanding corretly your situation ?


          Maximilien Lincourt Your Head A Splode - Strong Bad

          1 Reply Last reply
          0
          • B BRIMID

            The exe file is what I get after I compile and build my program. I run it and out comes an exe file. The program perfroms exactly how I want it to. Now I want to be able to take my code and enter it into MFC so I will have a more functional program that give the user the option to print out the results. With the exe you can only view it. Of course they could maybe cut and paste but that is not to professional. Thank You

            T Offline
            T Offline
            toxcct
            wrote on last edited by
            #5

            so what do you want to print ? binary datas ? source codes ? document files manipulated by your "exe" (program) ? ps : MFC is not a functionality or anything like that. MFC means "Microsoft foundation classes". it is a framework that provides you a set of classes and functions to ease you windows programming?


            TOXCCT >>> GEII power
            [toxcct][VisualCalc]

            1 Reply Last reply
            0
            • B BRIMID

              The exe file is what I get after I compile and build my program. I run it and out comes an exe file. The program perfroms exactly how I want it to. Now I want to be able to take my code and enter it into MFC so I will have a more functional program that give the user the option to print out the results. With the exe you can only view it. Of course they could maybe cut and paste but that is not to professional. Thank You

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              BRIMID wrote: The exe file is what I get after I compile and build my program. We all agree on this much. Hereinafter is where things get sketchy. BRIMID wrote: I run it and out comes an exe file. This implies that your program produces another .EXE file. Yes? BRIMID wrote: The program perfroms exactly how I want it to. What exactly does it do? BRIMID wrote: Now I want to be able to take my code and enter it into MFC so I will have a more functional program... Are you saying that you want to base your program on MFC rather than the standard Win32 API? BRIMID wrote: ...that give the user the option to print out the results. The results of what? BRIMID wrote: With the exe you can only view it. What is it viewing?


              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              B 1 Reply Last reply
              0
              • D David Crow

                BRIMID wrote: The exe file is what I get after I compile and build my program. We all agree on this much. Hereinafter is where things get sketchy. BRIMID wrote: I run it and out comes an exe file. This implies that your program produces another .EXE file. Yes? BRIMID wrote: The program perfroms exactly how I want it to. What exactly does it do? BRIMID wrote: Now I want to be able to take my code and enter it into MFC so I will have a more functional program... Are you saying that you want to base your program on MFC rather than the standard Win32 API? BRIMID wrote: ...that give the user the option to print out the results. The results of what? BRIMID wrote: With the exe you can only view it. What is it viewing?


                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                B Offline
                B Offline
                BRIMID
                wrote on last edited by
                #7

                I will try to explain a liitle simpler. I wrote a program to add 1+2=3 I Compile it, Build it, and then execute it. I have a exe file. Right? Everytime I run the exe file is see 1++2=3. But the file does not have the option to print. I would like to be able to print out the results of the program i.e., 1+2=3.

                D 1 Reply Last reply
                0
                • B BRIMID

                  I will try to explain a liitle simpler. I wrote a program to add 1+2=3 I Compile it, Build it, and then execute it. I have a exe file. Right? Everytime I run the exe file is see 1++2=3. But the file does not have the option to print. I would like to be able to print out the results of the program i.e., 1+2=3.

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  So all you are really wanting to do is output the sum of 1 and 2 to the screen? With C:

                  printf("%d\n", 1 + 2);

                  With C++:

                  cout << 1 + 2 << endl;

                  Does that help?


                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                  M B 2 Replies Last reply
                  0
                  • D David Crow

                    So all you are really wanting to do is output the sum of 1 and 2 to the screen? With C:

                    printf("%d\n", 1 + 2);

                    With C++:

                    cout << 1 + 2 << endl;

                    Does that help?


                    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                    M Offline
                    M Offline
                    Maximilien
                    wrote on last edited by
                    #9

                    agreed.


                    Maximilien Lincourt Your Head A Splode - Strong Bad

                    1 Reply Last reply
                    0
                    • D David Crow

                      So all you are really wanting to do is output the sum of 1 and 2 to the screen? With C:

                      printf("%d\n", 1 + 2);

                      With C++:

                      cout << 1 + 2 << endl;

                      Does that help?


                      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                      B Offline
                      B Offline
                      BRIMID
                      wrote on last edited by
                      #10

                      I have that. I am able to display output to the screen using cout<<. I want to send the output on the screen to the printer.

                      D 1 Reply Last reply
                      0
                      • B BRIMID

                        I have that. I am able to display output to the screen using cout<<. I want to send the output on the screen to the printer.

                        D Offline
                        D Offline
                        David Crow
                        wrote on last edited by
                        #11

                        Well, if you are running your program from a command prompt, just redirect its output to the printer like: C:\> myprog.exe > prn or C:\> myprog.exe > lpt1


                        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                        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