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. OLE controll for Powerpoint

OLE controll for Powerpoint

Scheduled Pinned Locked Moved C / C++ / MFC
c++comhelpquestion
12 Posts 2 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
    Soumyadipta
    wrote on last edited by
    #1

    I have created a non MFC win32 application,non dialog based. I want to open powerpoint slide in my application window. Is it possible to write OLE controller for powerpoint? Please Help:omg:

    D 1 Reply Last reply
    0
    • S Soumyadipta

      I have created a non MFC win32 application,non dialog based. I want to open powerpoint slide in my application window. Is it possible to write OLE controller for powerpoint? Please Help:omg:

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

      Soumyadipta wrote:

      Is it possible to write OLE controller for powerpoint?

      An OLE container? Have you tried importing from PowerPoint's type library?


      "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      S 1 Reply Last reply
      0
      • D David Crow

        Soumyadipta wrote:

        Is it possible to write OLE controller for powerpoint?

        An OLE container? Have you tried importing from PowerPoint's type library?


        "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

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

        Sorry no idea,any sample example available

        D 1 Reply Last reply
        0
        • S Soumyadipta

          Sorry no idea,any sample example available

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

          Soumyadipta wrote:

          any sample example available

          Yes, have you bothered to search for such examples?


          "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          S 1 Reply Last reply
          0
          • D David Crow

            Soumyadipta wrote:

            any sample example available

            Yes, have you bothered to search for such examples?


            "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            S Offline
            S Offline
            Soumyadipta
            wrote on last edited by
            #5

            Yes,but all applications are MFC based

            D 1 Reply Last reply
            0
            • S Soumyadipta

              Yes,but all applications are MFC based

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

              But the code that actually communicates with PowerPoint is not.


              "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

              "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

              S 1 Reply Last reply
              0
              • D David Crow

                But the code that actually communicates with PowerPoint is not.


                "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                S Offline
                S Offline
                Soumyadipta
                wrote on last edited by
                #7

                But I can't choose automation class from class wizard for non MFC application Please help me to find a proper sample

                D 1 Reply Last reply
                0
                • S Soumyadipta

                  But I can't choose automation class from class wizard for non MFC application Please help me to find a proper sample

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

                  Soumyadipta wrote:

                  But I can't choose automation class from class wizard for non MFC application

                  I just created a Win32 project, opened ClassWizard, clicked the Automation tab, and created an Excel class from its type library. It worked fine.


                  "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                  "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                  S 1 Reply Last reply
                  0
                  • D David Crow

                    Soumyadipta wrote:

                    But I can't choose automation class from class wizard for non MFC application

                    I just created a Win32 project, opened ClassWizard, clicked the Automation tab, and created an Excel class from its type library. It worked fine.


                    "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                    "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                    S Offline
                    S Offline
                    Soumyadipta
                    wrote on last edited by
                    #9

                    I have also created a non MFC win32 Project but i can't add class from type library using class wizard. I Think you have created MFC based win32 project. If i am wrong please tell me the detailed steps.

                    D 1 Reply Last reply
                    0
                    • S Soumyadipta

                      I have also created a non MFC win32 Project but i can't add class from type library using class wizard. I Think you have created MFC based win32 project. If i am wrong please tell me the detailed steps.

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

                      Soumyadipta wrote:

                      I have also created a non MFC win32 Project but i can't add class from type library using class wizard.

                      Lay out the exact steps you are using.

                      Soumyadipta wrote:

                      I Think you have created MFC based win32 project.

                      You would be wrong in your thinking.


                      "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                      S 1 Reply Last reply
                      0
                      • D David Crow

                        Soumyadipta wrote:

                        I have also created a non MFC win32 Project but i can't add class from type library using class wizard.

                        Lay out the exact steps you are using.

                        Soumyadipta wrote:

                        I Think you have created MFC based win32 project.

                        You would be wrong in your thinking.


                        "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                        S Offline
                        S Offline
                        Soumyadipta
                        wrote on last edited by
                        #11

                        Here is the details ------------------------------ I am using Visual Studio 2005 (8.0) File ->New -> Project Visual C++ Project ->Win32 -> Win32 Project Name=Oletest ,Saved to Desktop Application Settings -> Windows Application -> Finish //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Oletest.cpp : Defines the entry point for the application. // #include "stdafx.h" #include "Oletest.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance TCHAR szTitle[MAX_LOADSTRING]; // The title bar text TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name // Forward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { // TODO: Place code here. MSG msg; HACCEL hAccelTable; // Initialize global strings LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadString(hInstance, IDC_OLETEST, szWindowClass, MAX_LOADSTRING); MyRegisterClass(hInstance); // Perform application initialization: if (!InitInstance (hInstance, nCmdShow)) { return FALSE; } hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_OLETEST); // Main message loop: while (GetMessage(&msg, NULL, 0, 0)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return (int) msg.wParam; } // // FUNCTION: MyRegisterClass() // // PURPOSE: Registers the window class. // // COMMENTS: // // This function and its usage are only necessary if you want this code // to be compatible with Win32 systems prior to the 'RegisterClassEx' // function that was added to Windows 95. It is important to call this function // so that the application will get 'well formed' small icons associated // with it. // ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = (WNDPROC)WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = Load

                        D 1 Reply Last reply
                        0
                        • S Soumyadipta

                          Here is the details ------------------------------ I am using Visual Studio 2005 (8.0) File ->New -> Project Visual C++ Project ->Win32 -> Win32 Project Name=Oletest ,Saved to Desktop Application Settings -> Windows Application -> Finish //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Oletest.cpp : Defines the entry point for the application. // #include "stdafx.h" #include "Oletest.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance TCHAR szTitle[MAX_LOADSTRING]; // The title bar text TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name // Forward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { // TODO: Place code here. MSG msg; HACCEL hAccelTable; // Initialize global strings LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadString(hInstance, IDC_OLETEST, szWindowClass, MAX_LOADSTRING); MyRegisterClass(hInstance); // Perform application initialization: if (!InitInstance (hInstance, nCmdShow)) { return FALSE; } hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_OLETEST); // Main message loop: while (GetMessage(&msg, NULL, 0, 0)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return (int) msg.wParam; } // // FUNCTION: MyRegisterClass() // // PURPOSE: Registers the window class. // // COMMENTS: // // This function and its usage are only necessary if you want this code // to be compatible with Win32 systems prior to the 'RegisterClassEx' // function that was added to Windows 95. It is important to call this function // so that the application will get 'well formed' small icons associated // with it. // ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = (WNDPROC)WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = Load

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

                          Which shows nothing of how you are attempting to create the PowerPoint classes via ClassWizard.


                          "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                          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