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. OCX Control Dispatching

OCX Control Dispatching

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++tutorialcsharpvisual-studio
1 Posts 1 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
    BarryPearlman
    wrote on last edited by
    #1

    This is my first OCX control. I managed to "hack" through using an example and can Get/Set the stock properties through a "wrapper class", however, I am having trouble adding one of my own custon properties. I am using VC++ 7.0. Wrapper Class: //--------------------------------------------------------------------------------.cpp void CWrap::m_vSetParams(int nPtSize) { // I am able to get nPtSize! return; } //---------------------------------------------------------------------------------.h --- void m_vSetParams(int, CString); --- OCX Control Class //--------------------------------------------------------------------------------.cpp //DISPATCH MAP --- DISP_PROPERTY_EX(CGrpBoxExCtrl, "PointSize", GetPtSize, SetPtSize, VT_I2) -- //DISPATCH MAP void MyOCXCtrl::SetPtSize(short nPtSize) { m_nPtSize = nPtSize; return; } BSTR MyOCX::GetPtSize() { return ........ } //---------------------------------------------------------------------------------.h short m_nPtSize; --- public: enum {}; afx_msg void SetPtSize(int); afx_msg short GetPtSize(); --- //---------------------------------------------------------------------------------.odl Totally Lost Here!:confused: //---------------------------------------------------------------------------- Question How do I get the information (nPtSize) from the "wrapper" class to the control. Could someone please fill in the above or direct me to a simple artical or sample that would guide me. Is there a Wizard that does this, and if so, where in the Visual Studio editor is it? Need I point out that MSDN is totally & hopelessly confusing? :-) Barry

    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