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. Mixing COM and non-COM property pages

Mixing COM and non-COM property pages

Scheduled Pinned Locked Moved COM
c++comquestion
2 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.
  • D Offline
    D Offline
    DolphLundgren
    wrote on last edited by
    #1

    I'm working on an object that crosses two systems (one system uses standard CPropertyPages for all its objects, the other uses COM/ATL IPropertyPageImpl) The standard system objects simply create a property sheet and invoke DoModal() while the other uses OleCreatePropertyFrame() for its pages. How do you launch a mixed collection of both systems? (CPropertyPages with COM/ATL ones) Thanks in advance for advice!

    J 1 Reply Last reply
    0
    • D DolphLundgren

      I'm working on an object that crosses two systems (one system uses standard CPropertyPages for all its objects, the other uses COM/ATL IPropertyPageImpl) The standard system objects simply create a property sheet and invoke DoModal() while the other uses OleCreatePropertyFrame() for its pages. How do you launch a mixed collection of both systems? (CPropertyPages with COM/ATL ones) Thanks in advance for advice!

      J Offline
      J Offline
      Jorgen Sigvardsson
      wrote on last edited by
      #2

      DolphLundgren wrote: How do you launch a mixed collection of both systems? (CPropertyPages with COM/ATL ones) I don't know exactly how CPropertyPages work, so maybe what I'm about to suggest is just not doable. If so, then I appologize. I suppose you could inherit a new class from CPropertyPage, in which you host the COM property page, and mediates between the COM interfaces (IPropertyPage and IPropertyPageSite) and the CPropertyPage interface. What you need to think about when creating the COM property page is: * Your class based on CPropertyPage must implement IPropertyPageSite * After you've created the IPropertyPage object, call SetPageSite(this) * Give the COM object to the prop page object by using SetObjects() * Then call Activate(m_hWnd, rcTheRectangle, FALSE) * Followed by Show(SW_SHOW) (I think this is necessary - I don't remember - you'll notice) IPropertyPageSite is straightforward to implement. Please refer to the MSDN docs. Call the prop page object's Apply() method when suitable (probably on some well defined OnApply()-event defined for CPropertyPage). When you are closing down the CPropertyPage window, call the prop page object's Deactivate() method. -- Keep talking! You're the fool, I'm the preacher.

      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