예제 #1
0
파일: Win32.cs 프로젝트: zeliboba7/gordago
        public static bool InitCommonControls(int icc)
        {
            INITCOMMONCONTROLSEX iic = new INITCOMMONCONTROLSEX();

            iic.dwSize = 0x10;
            iic.dwICC  = icc;
            return(InitCommonControlsEx(ref iic));
        }
예제 #2
0
        static IPAddressTextBox()
        {
            INITCOMMONCONTROLSEX iccex = default(INITCOMMONCONTROLSEX);

            iccex.dwSize = Marshal.SizeOf(iccex);
            iccex.dwICC  = CommonControls.ICC_INTERNET_CLASSES;
            InitCommonControlsEx(ref iccex);
        }
예제 #3
0
파일: Win32.cs 프로젝트: stevencohn/Orqa
        public static bool InitCommonControls(int icc)
        {
            INITCOMMONCONTROLSEX initcommoncontrolsex1;

            initcommoncontrolsex1        = new INITCOMMONCONTROLSEX();
            initcommoncontrolsex1.dwSize = 0x10;
            initcommoncontrolsex1.dwICC  = icc;
            return(Win32.InitCommonControlsEx(ref initcommoncontrolsex1));
        }
예제 #4
0
 protected override void CreateHandle()
 {
     if (!base.RecreatingHandle)
     {
         INITCOMMONCONTROLSEX icc = new INITCOMMONCONTROLSEX();
         icc.dwICC = ICC_UPDOWN_CLASS;
         InitCommonControlsEx(icc);
     }
     base.CreateHandle();
 }
예제 #5
0
 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();
 }
예제 #6
0
            /// <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);
            }
예제 #8
0
        /// <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.");
            }
        }
예제 #9
0
        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();
        }
예제 #10
0
        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();
                }
            }
        }
예제 #11
0
 static extern bool InitCommonControlsEx(ref INITCOMMONCONTROLSEX iccex);
예제 #12
0
파일: WinApi.cs 프로젝트: emmauss/AvaVulkan
 public static extern void InitCommonControlsEx(ref INITCOMMONCONTROLSEX init);
예제 #13
0
 public static extern bool InitCommonControlsEx(INITCOMMONCONTROLSEX icc);
예제 #14
0
파일: Win32.cs 프로젝트: stevencohn/Orqa
 private static extern bool InitCommonControlsEx(ref INITCOMMONCONTROLSEX iic);
예제 #15
0
 private static partial BOOL InitCommonControlsExInternal(ref INITCOMMONCONTROLSEX picce);
예제 #16
0
 public static extern bool InitCommonControlsEx(INITCOMMONCONTROLSEX icc);
예제 #17
0
 public static extern bool InitCommonControlsEx(ref INITCOMMONCONTROLSEX init_struct);
예제 #18
0
파일: CommCtrl.cs 프로젝트: orf53975/Vanara
        public static bool InitCommonControlsEx(CommonControlClass ccc)
        {
            var icc = new INITCOMMONCONTROLSEX(ccc);

            return(InitCommonControlsEx(ref icc));
        }
예제 #19
0
 public static BOOL InitCommonControlsEx(ref INITCOMMONCONTROLSEX picce)
 {
     picce.dwSize = (uint)Marshal.SizeOf <INITCOMMONCONTROLSEX>();
     return(InitCommonControlsExInternal(ref picce));
 }
예제 #20
0
파일: Rebar.cs 프로젝트: kixtarte/cadencii
        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();
                }
            }
        }
예제 #21
0
 static extern bool InitCommonControlsEx(ref INITCOMMONCONTROLSEX iccex);
예제 #22
0
 internal static extern bool InitCommonControlsEx(ref INITCOMMONCONTROLSEX data);