当前位置: 首页>>代码示例>>C#>>正文


C# IntPtr.ToLoWord方法代码示例

本文整理汇总了C#中System.IntPtr.ToLoWord方法的典型用法代码示例。如果您正苦于以下问题:C# IntPtr.ToLoWord方法的具体用法?C# IntPtr.ToLoWord怎么用?C# IntPtr.ToLoWord使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.IntPtr的用法示例。


在下文中一共展示了IntPtr.ToLoWord方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WindowProcedure

		private IntPtr WindowProcedure(IntPtr hwnd, int message, IntPtr wParam, IntPtr lParam, ref bool handled)
		{
			var lresult = IntPtr.Zero;
			switch ((WindowMessage)message)
			{
				case WindowMessage.NonClientAreaHitTest:
					handled = true;
					lresult = OnNonClientAreaHitTest(hwnd, message, wParam, lParam);
					break;

				case WindowMessage.DpiChanged:
					{
						var dpiX = wParam.ToLoWord();
						var dpiY = wParam.ToHiWord();
						var suggested = (NativeRect)System.Runtime.InteropServices.Marshal.PtrToStructure(lParam, typeof(NativeRect));
						this.OnDpiChanged(new Dpi(dpiX, dpiY), suggested);
						handled = true;
						break;
					}

				case WindowMessage.EnterSizeMove:
					this.OnEnterSizeMove();
					break;

				case WindowMessage.ExitSizeMove:
					this.OnExitSizeMove();
					break;
			}
			return lresult;
		}
开发者ID:mntone,项目名称:Windows.PerMonitorDpiSupport,代码行数:30,代码来源:PerMonitorDpiSupportWindow.cs

示例2: HwndHook

        private IntPtr HwndHook(IntPtr hWnd, int message, IntPtr wParam, IntPtr lParam, ref bool handled)
        {
            var returnval = IntPtr.Zero;

            switch (message)
            {
                case Constants.WM_DPICHANGED:
                    if (this.isPerMonitorDpiSupported)
                    {
                        var dpiX = wParam.ToLoWord();
                        var dpiY = wParam.ToHiWord();
                        this.ChangeDpi(new Dpi(dpiX, dpiY));
                        handled = true;
                    }
                    break;

                case Constants.WM_NCLBUTTONDOWN:
                    this.window.isSystemMenuOpened = false;
                    break;
            }

            return returnval;
        }
开发者ID:mntone,项目名称:Fluent.Ribbon,代码行数:23,代码来源:WindowSizing.cs

示例3: WndProc

        private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
        {
            if (msg == (int)WM.DPICHANGED)
            {
                var dpiX = wParam.ToHiWord();
                var dpiY = wParam.ToLoWord();
                this.ChangeDpi(new Dpi(dpiX, dpiY));
                handled = true;
            }

            return IntPtr.Zero;
        }
开发者ID:nirvaeld,项目名称:KanColleViewer,代码行数:12,代码来源:MetroWindow.cs

示例4: WndProc

        private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
        {
            if (msg == (int)WM.NCHITTEST)
            {
                if (this.ResizeMode == ResizeMode.CanResizeWithGrip
                    && this.WindowState == WindowState.Normal
                    && this.resizeGrip != null)
                {
                    var ptScreen = lParam.ToPoint();
                    var ptClient = this.resizeGrip.PointFromScreen(ptScreen);

                    var rectTarget = new Rect(0, 0, this.resizeGrip.ActualWidth, this.resizeGrip.ActualHeight);
                    if (rectTarget.Contains(ptClient))
                    {
                        handled = true;
                        return (IntPtr)HitTestValues.HTBOTTOMRIGHT;
                    }
                }
            }
            else if (msg == (int)WM.DPICHANGED)
            {
                var dpiX = wParam.ToLoWord();
                var dpiY = wParam.ToHiWord();
                this.ChangeDpi(new Dpi(dpiX, dpiY));
                handled = true;
            }

            return IntPtr.Zero;
        }
开发者ID:Grabacr07,项目名称:MetroRadiance,代码行数:29,代码来源:MetroWindow.cs


注:本文中的System.IntPtr.ToLoWord方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。