J
Julia
Any one experienced with msoControlActiveX?
I know it is undocumented,but i am using it on OL2000 and it is work fine
This is part of my ATL code which create an activex control on outlook bar
#import "C:\Program Files\Microsoft Office\Office\MSO9.DLL"
STDMETHODIMP CBar::RegisterBar(IDispatch* Surface)
{
// TODO: Add your implementation code here
CComQIPtr<Office::CommandBarControl> spControl=Surface;
CComQIPtr<Office::_CommandBarActiveX> spActiveX=spControl;
spActiveX->put_ControlCLSID(L"{D1C7914B-62F7-46BF-B5FC-80337049F228}");
spActiveX->put_Enabled(VARIANT_TRUE);
return S_OK;
}
Here is the VB code which uses it
cbrNewToolbar.Protection = msoBarNoChangeDock 'must not be float or else
painting problems accures
Dim myCtl As CommandBarControl
Set myCtl = cbrNewToolbar.Controls.Add(msoControlActiveX, 1, , , True)
Dim x As New cmdbarLib.Bar
x.RegisterBar myCtl
With myCtl
.Position = msoBarTop
.Visible = True
.Height = 32
.Enabled = True
End With
10X
I know it is undocumented,but i am using it on OL2000 and it is work fine
This is part of my ATL code which create an activex control on outlook bar
#import "C:\Program Files\Microsoft Office\Office\MSO9.DLL"
STDMETHODIMP CBar::RegisterBar(IDispatch* Surface)
{
// TODO: Add your implementation code here
CComQIPtr<Office::CommandBarControl> spControl=Surface;
CComQIPtr<Office::_CommandBarActiveX> spActiveX=spControl;
spActiveX->put_ControlCLSID(L"{D1C7914B-62F7-46BF-B5FC-80337049F228}");
spActiveX->put_Enabled(VARIANT_TRUE);
return S_OK;
}
Here is the VB code which uses it
cbrNewToolbar.Protection = msoBarNoChangeDock 'must not be float or else
painting problems accures
Dim myCtl As CommandBarControl
Set myCtl = cbrNewToolbar.Controls.Add(msoControlActiveX, 1, , , True)
Dim x As New cmdbarLib.Bar
x.RegisterBar myCtl
With myCtl
.Position = msoBarTop
.Visible = True
.Height = 32
.Enabled = True
End With
10X