internal override bool Create(IntPtr parentHandle) { //if(this.ControlId == 0) //{ // LastControlId +=1; // this.ControlId = LastControlId; //} if (this.CommonControlType != CommonControls.ICC_UNDEFINED) { InitCommonControlsEx ccInit = new InitCommonControlsEx(this.CommonControlType); ComCtl32.InitCommonControlsEx(ref ccInit); } this.ParentHandle = parentHandle; this.Handle = User32.CreateWindowEx(0, "static", this.Text, this.Style, this.Left, this.Top, this.Width, this.Height, this.ParentHandle, (IntPtr)this.ControlId, IntPtr.Zero, IntPtr.Zero); return(true); }
public static extern bool InitCommonControlsEx(ref InitCommonControlsEx iccex);
/// <summary> /// Registers specific common control classes from the common control DLL /// </summary> /// <param name="iccex">A pointer to an INITCOMMONCONTROLSEX structure that contains information /// specifying which control classes will be registered</param> /// <returns>Returns true if successful, or false otherwise</returns> public static bool InitCommonControlsEx(ref InitCommonControlsEx iccex) { return(Native.InitCommonControlsEx(ref iccex)); }