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