private Bitmap GetBitmap(MessageLabelIcon icon) { if (icon == MessageLabelIcon.None) return null; IntPtr iconHandle; Win32.LoadIconMetric(IntPtr.Zero, new IntPtr((int)icon), 0, out iconHandle); try { return Utils.ToBitmap(iconHandle, 16, 16); } finally { Win32.DestroyIcon(iconHandle); } }
private Bitmap GetBitmap(MessageLabelIcon icon) { if (icon == MessageLabelIcon.None) { return(null); } IntPtr iconHandle; Win32.LoadIconMetric(IntPtr.Zero, new IntPtr((int)icon), 0, out iconHandle); try { return(Utils.ToBitmap(iconHandle, 16, 16)); } finally { Win32.DestroyIcon(iconHandle); } }