如何在 c++ 中创建 ControlSource ms-access 属性没有VB6
我正在尝试使用 Visual Studio 2022 创建一个 MFC ActiveX 控件,当插入到 ms-access 表单中时,该控件在数据类别下应该有一个 ControlSource
属性。这样就可以在 ms-access 中绑定该属性。
我在互联网上找到了以下 VB6 代码,但我不知道如何用现代 C++ 来实现它。 MemberInfo
、VB_ProcData
和 VB_MemberFlags
和 VB_UserMemId
似乎是我需要的重要部分。
有谁知道目前是否可以创建这样的财产,以及如何完成?
在 C++ 或 .NET Visual Basic 或 C# 中?或者知道 VB_ProcData 等的任何文档链接吗?
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=13,0,0,
Public Property Get DataString() As String
Attribute DataString.VB_Description = "Data to be encoded to QR Code"
Attribute DataString.VB_ProcData.VB_Invoke_Property = ";Data"
Attribute DataString.VB_UserMemId = 0
Attribute DataString.VB_MemberFlags = "224"
DataString = m_DataString
End Property
Public Property Let DataString(ByVal New_DataString As String)
m_DataString = New_DataString
End Property
来源: 为 MS Access 制作 QRCode ActiveX 控件:控制源属性
以下设置似乎有效:win10-64+office2007+visual studio 6。
现在我将把我的 vs2019-c++ ActiveX 控件嵌入到Visual Studio 6-ocx 中的 UserControl,并在需要时创建事件/属性。当然,我更喜欢 1 ocx,但访问集成更为重要。
我仍然在寻找一种方法来使用 vs2019 来做到这一点,任何帮助将不胜感激。
I'm trying to create a MFC ActiveX control with Visual Studio 2022, that should have a ControlSource
property under Data Category when inserted in ms-access form. So that it would be possible to bind that property within ms-access.
I found following VB6-code on internet but i have no clue how to implement this with modern c++. MemberInfo
, VB_ProcData
and VB_MemberFlags
and VB_UserMemId
seem to be the important part for what i need.
Does anyone know if it's currently possible to create such property, and how that would be done?
in c++ or .net visual basic or c#? Or knows any documentation links for VB_ProcData
and such?
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=13,0,0,
Public Property Get DataString() As String
Attribute DataString.VB_Description = "Data to be encoded to QR Code"
Attribute DataString.VB_ProcData.VB_Invoke_Property = ";Data"
Attribute DataString.VB_UserMemId = 0
Attribute DataString.VB_MemberFlags = "224"
DataString = m_DataString
End Property
Public Property Let DataString(ByVal New_DataString As String)
m_DataString = New_DataString
End Property
source: Making QRCode ActiveX Control for MS Access: Control Source Property
The following setup seems to work: win10-64+office2007+visual studio 6.
For now I'm going to embed my vs2019-c++ ActiveX control in a UserControl in visual studio 6-ocx, and create events/properties where needed. Of course I would prefer 1 ocx, but integration in access is much more important.
Still I'm looking for a way to do that with vs2019, and any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论