public static bool InitCommonControls(int icc) { INITCOMMONCONTROLSEX iic = new INITCOMMONCONTROLSEX(); iic.dwSize = 0x10; iic.dwICC = icc; return(InitCommonControlsEx(ref iic)); }
static IPAddressTextBox() { INITCOMMONCONTROLSEX iccex = default(INITCOMMONCONTROLSEX); iccex.dwSize = Marshal.SizeOf(iccex); iccex.dwICC = CommonControls.ICC_INTERNET_CLASSES; InitCommonControlsEx(ref iccex); }
public static bool InitCommonControls(int icc) { INITCOMMONCONTROLSEX initcommoncontrolsex1; initcommoncontrolsex1 = new INITCOMMONCONTROLSEX(); initcommoncontrolsex1.dwSize = 0x10; initcommoncontrolsex1.dwICC = icc; return(Win32.InitCommonControlsEx(ref initcommoncontrolsex1)); }
protected override void CreateHandle() { if (!base.RecreatingHandle) { INITCOMMONCONTROLSEX icc = new INITCOMMONCONTROLSEX(); icc.dwICC = ICC_UPDOWN_CLASS; InitCommonControlsEx(icc); } base.CreateHandle(); }
protected override void CreateHandle() { if (!RecreatingHandle) { INITCOMMONCONTROLSEX icex = new INITCOMMONCONTROLSEX(); icex.dwSize = Marshal.SizeOf(typeof(INITCOMMONCONTROLSEX)); icex.dwICC = (int)(CommonControlInitFlags.ICC_BAR_CLASSES | CommonControlInitFlags.ICC_COOL_CLASSES); WindowsAPI.InitCommonControlsEx(icex); } base.CreateHandle(); }
/// <summary> /// Initialize Windows common controls before try to use them /// </summary> /// <returns>TRUE - if successful, FALSE - fail</returns> private bool InitializeCommonControls() { INITCOMMONCONTROLSEX icex = new INITCOMMONCONTROLSEX(); icex.dwSize = Marshal.SizeOf(typeof(INITCOMMONCONTROLSEX)); icex.dwICC = (int)CommonControlInitFlags.ICC_WIN95_CLASSES; bool bStatus = WindowsAPI.InitCommonControlsEx(icex); return(bStatus); }
public static IDisposable EnableVisualStyles(bool enable) { IDisposable ctx = new ActiveContext(enable ? hActCtxCommonControls : IntPtr.Zero); if (!Initialized) { var init = new INITCOMMONCONTROLSEX(); InitCommonControlsEx(ref init); Initialized = true; } return(ctx); }
/// <summary> /// Operations /// </summary> /// <summary> /// <code>void Init(Classes fClasses)</code> /// <para>Initializes common controls.</para> /// </summary> /// <param name="fClasses"> Bit flags defining classes to be initialized</param> static public void Init(Classes fClasses) { INITCOMMONCONTROLSEX icc = new INITCOMMONCONTROLSEX(Marshal.SizeOf(typeof(INITCOMMONCONTROLSEX)), (int)fClasses); bool bResult = InitCommonControlsEx(ref icc); Debug.Assert(bResult); if (!bResult) { throw new SystemException("Failture initializing common controls."); } }
protected override void CreateHandle() { // Make sure common control library initilizes updown control if (!RecreatingHandle) { INITCOMMONCONTROLSEX icex = new INITCOMMONCONTROLSEX(); icex.dwSize = Marshal.SizeOf(typeof(INITCOMMONCONTROLSEX)); icex.dwICC = (int)CommonControlInitFlags.ICC_WIN95_CLASSES; WindowsAPI.InitCommonControlsEx(icex); } base.CreateHandle(); }
protected override void OnCreateControl() { base.OnCreateControl(); INITCOMMONCONTROLSEX ComCtls = new INITCOMMONCONTROLSEX(); ComCtls.dwICC = (uint)win32.ICC_COOL_CLASSES; ComCtls.dwSize = (uint)Marshal.SizeOf(ComCtls); bool Result = win32.InitCommonControlsEx(ref ComCtls); if (!Result) { MessageBox.Show("There was a tragic error. InitCommControlsEx Failed!"); } else { _rebar = new NativeRebar(win32.CreateWindowEx( 0U, "ReBarWindow32", null, (uint)Style, 0, 0, this.Width, this.Height, this.Handle, (IntPtr)1,//This will always be the only child window IntPtr.Zero, 0 )); win32.SetWindowLongPtr(_rebar.Handle, (int)win32.GWL_EXSTYLE, (IntPtr)win32.WS_EX_TOOLWINDOW); _rebar.WindowPosChanging += new NativeRebarEventHandler(OnWindowPosChanging); _rebar.WindowsMessageRecieved += new NativeRebarEventHandler(OnWindowsMessageRecieved); UpdateImageList(); UpdateColors(); foreach (RebarBand band in _bands) { band.CreateBand(); } } }
static extern bool InitCommonControlsEx(ref INITCOMMONCONTROLSEX iccex);
public static extern void InitCommonControlsEx(ref INITCOMMONCONTROLSEX init);
public static extern bool InitCommonControlsEx(INITCOMMONCONTROLSEX icc);
private static extern bool InitCommonControlsEx(ref INITCOMMONCONTROLSEX iic);
private static partial BOOL InitCommonControlsExInternal(ref INITCOMMONCONTROLSEX picce);
public static extern bool InitCommonControlsEx(INITCOMMONCONTROLSEX icc);
public static extern bool InitCommonControlsEx(ref INITCOMMONCONTROLSEX init_struct);
public static bool InitCommonControlsEx(CommonControlClass ccc) { var icc = new INITCOMMONCONTROLSEX(ccc); return(InitCommonControlsEx(ref icc)); }
public static BOOL InitCommonControlsEx(ref INITCOMMONCONTROLSEX picce) { picce.dwSize = (uint)Marshal.SizeOf <INITCOMMONCONTROLSEX>(); return(InitCommonControlsExInternal(ref picce)); }
protected override void OnCreateControl() { base.OnCreateControl(); INITCOMMONCONTROLSEX ComCtls = new INITCOMMONCONTROLSEX(); ComCtls.dwICC = (uint)win32.ICC_COOL_CLASSES; ComCtls.dwSize = (uint)Marshal.SizeOf( ComCtls ); bool Result = win32.InitCommonControlsEx( ref ComCtls ); if ( !Result ) { MessageBox.Show( "There was a tragic error. InitCommControlsEx Failed!" ); } else { _rebar = new NativeRebar( win32.CreateWindowEx( 0U, "ReBarWindow32", null, (uint)Style, 0, 0, this.Width, this.Height, this.Handle, (IntPtr)1,//This will always be the only child window IntPtr.Zero, 0 ) ); win32.SetWindowLongPtr( _rebar.Handle, (int)win32.GWL_EXSTYLE, (IntPtr)win32.WS_EX_TOOLWINDOW ); _rebar.WindowPosChanging += new NativeRebarEventHandler( OnWindowPosChanging ); _rebar.WindowsMessageRecieved += new NativeRebarEventHandler( OnWindowsMessageRecieved ); UpdateImageList(); UpdateColors(); foreach ( RebarBand band in _bands ) { band.CreateBand(); } } }
static extern bool InitCommonControlsEx(ref INITCOMMONCONTROLSEX iccex);
internal static extern bool InitCommonControlsEx(ref INITCOMMONCONTROLSEX data);