Solved

About use ActiveX Control's properties in VB

Posted on 2000-03-09
4
230 Views
Last Modified: 2013-11-20
I Created a ActiveX Control's using MFC ActiveX Control Wizard in VC++. As soon as I set the properties' value use the built control in vb,I found that its self-defined properties' value disapeared at run-time,and when I stop the application in vb's debug mode, their value was recleared. why?
0
Comment
Question by:ycl
  • 2
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
Norbert earned 50 total points
ID: 2601281
did you implement DoPropExchange ?
example:
void CYourCtrl::DoPropExchange(CPropExchange* pPX) /*\L1\L2 $Workfile: KKOSetCtl.cpp $*/
{
/*\B2
 * Persistence support
 * This function does the persistent storage of propertys in VB component documents.
 *
 * Returnvalue: void
 *
 *\E2*/

      ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
      COleControl::DoPropExchange(pPX);

      PX_String(pPX, _T("Property1"), m_Prop1, "");
      PX_String(pPX, _T("Property2"), m_Prop2, "");
      PX_Bool  (pPX, _T("Property3"), m_Prop3, TRUE);
....
}
0
 

Author Comment

by:ycl
ID: 2602852
Thank you!
0
 

Author Comment

by:ycl
ID: 2602985
But another problem is why when changed the value in property page,the values  did not present in VB's build-in Property Window immediately?
0
 
LVL 3

Expert Comment

by:Norbert
ID: 2603646
there is a function setModifyFlag
and BoundPropertyChanged
did you call them ?
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now