BuiltIn control ID 1874

Add-in Express™ Support Service
That's what is more important than anything else

BuiltIn control ID 1874
 
Esteban Astudillo


Guest


This is weird.

I used the BuiltInControlScanner utility to look for the IDs I want to handle the OnClick event for. For the "New" button in the Explorer's Standard toolbar it returns ID 1874.

If I create a BuiltIn control using this value for the ID property I get the exception message included below when Outlook starts. If I change the ID to something else (say, 354 for "Reply") no errors at all.

I haven't tried to reproduce this in an isolated application but I thought you would like to know


****** EXCEPTION MESSAGE ********

Detailed technical information follows:
---
Date and Time: 23/03/2006 10:16:16 AM
Machine Name: XXXXX
IP Address: XXXXX
Current User: XXXXX

Application Domain: DefaultDomain
Assembly Codebase: file:///c:/windows/assembly/gac/addinexpress.mso/2.4.1756.0__c20c070a1fc9a144/addinexpress.mso.dll
Assembly Full Name: AddinExpress.MSO, Version=2.4.1756.0, Culture=neutral, PublicKeyToken=c20c070a1fc9a144
Assembly Version: 2.4.1756.0
Assembly Build Date: 21/03/2006 11:51:00 AM

Exception Source:
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: Member not found.
Exception Target Site: ForwardCallToInvokeMember

---- Stack Trace ----
System.RuntimeType.ForwardCallToInvokeMember(memberName As String, flags As BindingFlags, target As Object, aWrapperTypes As Int32[], msgData As MessageData&)
addinexpress.mso.dll: N 00431 (0x1AF) JIT
AddinExpress.MSO.ICommandBarControl.set_OnAction(value As String)
addinexpress.mso.dll: N 00000 (0x0) JIT
AddinExpress.MSO.ADXAddinModule.InternalAddBuiltInControl(control As ADXBuiltInControl)
addinexpress.mso.dll: N 00560 (0x230) JIT


Posted 23 Mar, 2006 12:52:24 Top
Esteban Astudillo


Guest


I just noticed that the BuiltInControlScanner utility actually reports that the "New" button I was looking at (ID 1874) has an "Unsupported - 0x000D" message in the "Type" column.

I guess this is because I was trying to refer to the sub-menu control called "New" in the "Standard" toolbar, instead of the "Mail Message" button (ID 1757) under the Menu Bar / File / New menu option which is what I wanted in the first place. This ID 1757 doesn't raise the exception like the 1874 one.

I thought the info could help somebody else.. ;)
Posted 23 Mar, 2006 16:38:47 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Esteban.

The fact is that the control with ID = 1874 is not a button. So you can't handle the OnClick event of this control. Moreover some built-in controls don't allow to change their properties at all. That is why you get the error message.
Posted 23 Mar, 2006 17:39:52 Top