protected AxHost(string clsid, int flags)
 {
     this.REGMSG_MSG = System.Windows.Forms.SafeNativeMethods.RegisterWindowMessage(Application.WindowMessagesVersion + "_subclassCheck");
     this.axState = new BitVector32();
     this.storageType = -1;
     this.wndprocAddr = IntPtr.Zero;
     this.text = "";
     this.hwndFocus = IntPtr.Zero;
     if (Application.OleRequired() != ApartmentState.STA)
     {
         throw new ThreadStateException(System.Windows.Forms.SR.GetString("AXMTAThread", new object[] { clsid }));
     }
     this.oleSite = new OleInterfaces(this);
     this.selectionChangeHandler = new EventHandler(this.OnNewSelection);
     this.clsid = new Guid(clsid);
     this.flags = flags;
     this.axState[assignUniqueID] = !base.GetType().GUID.Equals(comctlImageCombo_Clsid);
     this.axState[needLicenseKey] = true;
     this.axState[rejectSelection] = true;
     this.isMaskEdit = this.clsid.Equals(maskEdit_Clsid);
     this.onContainerVisibleChanged = new EventHandler(this.OnContainerVisibleChanged);
 }
Пример #2
0
        protected AxHost(string clsid, int flags) : base() {
            if (Application.OleRequired() != ApartmentState.STA) {
                throw new ThreadStateException(SR.GetString(SR.AXMTAThread, clsid));
            }

            this.oleSite = new OleInterfaces(this);
            this.selectionChangeHandler = new EventHandler(this.OnNewSelection);
            this.clsid = new Guid(clsid);
            this.flags = flags;

            this.axState[assignUniqueID] = !this.GetType().GUID.Equals(comctlImageCombo_Clsid);
            this.axState[needLicenseKey] = true;
            this.axState[rejectSelection] = true;

            isMaskEdit = this.clsid.Equals(AxHost.maskEdit_Clsid);
            this.onContainerVisibleChanged = new EventHandler(this.OnContainerVisibleChanged);
        }