/// <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 extern bool InitCommonControlsEx(INITCOMMONCONTROLSEX icc);
protected override void CreateHandle() { // Make sure common control library initilizes toolbars and rebars 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 ); } // Handle is being created or recreated, reset placeHolder flag placeHolderAdded = false; 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); bool fail = WindowsAPI.InitCommonControlsEx(icex); } base.CreateHandle(); }
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(); }
public static extern bool InitCommonControlsEx(INITCOMMONCONTROLSEX icc);