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. COM
  4. Drawing ActiveX window

Drawing ActiveX window

Scheduled Pinned Locked Moved COM
comgraphicsquestion
3 Posts 3 Posters 1 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    How do we draw ActiveX window (visible ActiveX) on to a window using "win32 SDK"(I mean not using Microsoft Foundation Classes !)? Thanks and Best regards, Deepu:rolleyes:

    R K 2 Replies Last reply
    0
    • L Lost User

      How do we draw ActiveX window (visible ActiveX) on to a window using "win32 SDK"(I mean not using Microsoft Foundation Classes !)? Thanks and Best regards, Deepu:rolleyes:

      R Offline
      R Offline
      Ryan Park
      wrote on last edited by
      #2

      Hi, Probably you mean you want to host ActiveX control in your Win32 Application. Right? Hosting a control without support of MFC is very hard to implement. Try to search PATRON sample from MSDN. It's a sample used in book "Inside OLE" by Kraig. It has no reliability to any librarys like MFC or ATL. Cause of the purpose of the sample, it has little support as a container. BTW, if you don't mind using ATL, try to use CAxWindow or something like that. That control hosting support class template. It's very useful to host a control. IMHO ATL which has very readable source compared to MFC, is something worth to work on as a Windows programmer. Essentially about ATL, I recommend to read the book "ATL Internals" by Chris Sells. Hope this helps. Regards, Ryan :rolleyes:

      1 Reply Last reply
      0
      • L Lost User

        How do we draw ActiveX window (visible ActiveX) on to a window using "win32 SDK"(I mean not using Microsoft Foundation Classes !)? Thanks and Best regards, Deepu:rolleyes:

        K Offline
        K Offline
        Kastellanos Nikos
        wrote on last edited by
        #3

        first call OleInitialize(NULL) (but off course you know that) Then create the Object and get its LPDISPATCH, or it's interface pointer. If necesary, Invoke any method of the interface for loading documents or initializing. Query the OleInPlaceObject interface and set the object rectagular. RECT Pos={0,0,500,400},Clip={0,0,500,400}; OleInPlaceObject->SetObjectRects(&Pos,&Clip); When you want to paint it , query the IViewObject interface and call the 'draw' method. RECTL rectl={0,0,250,200}; ViewObject->Draw(DVASPECT_CONTENT,-1,0,0,0,(HDC)hdcDraw,&rectl,0,0,0); I use this in a CGI i am making where i just want to take a quick snapshot of Adobe's SVG control. I will generate SVG files using CF or ASP, then renter them using SVG control, encode them to JPG using CGI+ and sent them to the client! In the same pattern you can use a control founded in Corel draw that generates barcodes. - - - - - - - - - - - - - - - - - - Memory leaks is the price we pay \0 01234567890123456789012345678901234

        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