SendMessage() private method

private SendMessage ( IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam ) : IntPtr
hWnd System.IntPtr
wMsg int
wParam System.IntPtr
lParam System.IntPtr
return System.IntPtr
コード例 #1
0
        public static void SetTreeViewImageList(TreeView treeView, SysImageList sysImageList, bool forStateImages)
        {
            IntPtr wParam = (IntPtr)0;

            if (forStateImages)
            {
                wParam = (IntPtr)2;
            }
            SysImageListHelper.SendMessage(treeView.Handle, 4361, wParam, sysImageList.Handle);
        }
コード例 #2
0
        public static void SetListViewImageList(ListView listView, SysImageList sysImageList, bool forStateImages)
        {
            IntPtr wParam = (IntPtr)0;

            if (sysImageList.ImageListSize == SysImageListSize.smallIcons)
            {
                wParam = (IntPtr)1;
            }
            if (forStateImages)
            {
                wParam = (IntPtr)2;
            }
            SysImageListHelper.SendMessage(listView.Handle, 4099, wParam, sysImageList.Handle);
        }