Beispiel #1
0
        /// <summary>
        /// Creates an instance of the <typeparamref name="RadRibbonFormBehavior"/> class.
        /// </summary>
        /// <param name="treeHandler">The associated <typeparamref name="IComponentTreeHandler"/> implementation.</param>
        /// <param name="shouldHandleCreateChildItems">Determines whether the behavior
        /// handles the CreateChildItems call.</param>
        public RadRibbonFormBehavior(IComponentTreeHandler treeHandler, bool shouldHandleCreateChildItems)
            : base(treeHandler, shouldHandleCreateChildItems)
        {
            DllWrapper dwmapi = new DllWrapper("dwmapi.dll");

            DwmExtendFrameIntoClientArea =
                (DwmExtendFrameIntoClientAreaDelegate)dwmapi.GetFunctionAsDelegate("DwmExtendFrameIntoClientArea", typeof(DwmExtendFrameIntoClientAreaDelegate));

            DwmDefWindowProc =
                (DwmDefWindowProcDelegate)dwmapi.GetFunctionAsDelegate("DwmDefWindowProc", typeof(DwmDefWindowProcDelegate));
        }
Beispiel #2
0
        /// <summary>
        /// Creates an instance of the <typeparamref name="RadRibbonFormBehavior"/> class.
        /// This instance is not associated with an <typeparamref name="IComponentTreeHandler"/> implementation.
        /// </summary>
        public RadRibbonFormBehavior()
            : base()
        {
            DllWrapper dwmapi = new DllWrapper("dwmapi.dll");

            DwmExtendFrameIntoClientArea =
                (DwmExtendFrameIntoClientAreaDelegate)dwmapi.GetFunctionAsDelegate("DwmExtendFrameIntoClientArea", typeof(DwmExtendFrameIntoClientAreaDelegate));

            DwmDefWindowProc =
                (DwmDefWindowProcDelegate)dwmapi.GetFunctionAsDelegate("DwmDefWindowProc", typeof(DwmDefWindowProcDelegate));
        }