Thread: How To Insert Objects Without Using Insert Object Dialog Box

  1. #1
    mr ed
    Guest

    How To Insert Objects Without Using Insert Object Dialog Box

    I want to insert an ole object without using the COleInsertDialog dialog. I have found this code at msdn:

    CLSID clsid;
    if(FAILED(::CLSIDFromProgID("Excel.Sheet",&clsid)) )
    AfxThrowMemoryException();

    But instead of an excel spreadsheet I want to insert a paint bitmap. What would I need to replace "Excel.Sheet" with?

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    72
    try
    Paint.Picture

    grep the Windows registry for the mspaint.exe.
    Somewhere in the 'classes' section will be the node with the GUID of the paint ole server and in the sub-tree you will found node named "ProgID", which value can be passed as argument of the CLSIDFromProgID()

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Display Dialog Box Then Execute
    By stickman in forum C++ Programming
    Replies: 17
    Last Post: 05-10-2006, 11:02 AM
  2. A question about constructors...
    By Wolve in forum C++ Programming
    Replies: 9
    Last Post: 05-04-2005, 04:24 PM
  3. Get a string from a modal dialog box
    By axr0284 in forum Windows Programming
    Replies: 1
    Last Post: 03-03-2005, 01:39 PM
  4. Add a dialog box to a tab
    By axr0284 in forum Windows Programming
    Replies: 0
    Last Post: 01-10-2005, 08:38 AM
  5. problem with the open dialog box
    By stallion in forum Windows Programming
    Replies: 13
    Last Post: 02-19-2003, 08:28 AM