Helper Methods for Connecting SysImageList to Common Controls
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }