pub fn copy_as_icon(&self) -> crate::Icon {
        use winapi::um::winuser::CreateIconIndirect;
        use winapi::um::winuser::ICONINFO;

        if self.handle.is_null() {
            panic!("Bitmap was not initialized");
        }

        let mut icon_info = ICONINFO {
            fIcon: 1,
            xHotspot: 0,
            yHotspot: 0,
            hbmMask: self.handle as _,
            hbmColor: self.handle as _
        };

        let icon = unsafe { CreateIconIndirect(&mut icon_info) };

        crate::Icon {
            handle: icon as _,
            owned: true
        }
    }
/**
        Creates a new icon from the bitmap data.
        
        Panics if the bitmap is not initialized
    */
Creates a new icon from the bitmap data.
Panics if the bitmap is not initialized
Creates a new icon from the bitmap data . Panics if the bitmap is not initialized
pub fn copy_as_icon(&self) -> crate::Icon {
        use winapi::um::winuser::CreateIconIndirect;
        use winapi::um::winuser::ICONINFO;
        if self.handle.is_null() {
            panic!("Bitmap was not initialized");
        }
        let mut icon_info = ICONINFO {
            fIcon: 1,
            xHotspot: 0,
            yHotspot: 0,
            hbmMask: self.handle as _,
            hbmColor: self.handle as _
        };
        let icon = unsafe { CreateIconIndirect(&mut icon_info) };
        crate::Icon {
            handle: icon as _,
            owned: true
        }
    }
pub fn copy_as_icon ( & self ) -> crate :: Icon { use winapi :: um :: winuser :: CreateIconIndirect ; use winapi :: um :: winuser :: ICONINFO ; if self . handle . is_null ( ) { panic ! ( " " ) ; } let mut icon_info = ICONINFO { fIcon : 1 , xHotspot : 0 , yHotspot : 0 , hbmMask : self . handle as _ , hbmColor : self . handle as _ } ; let icon = unsafe { CreateIconIndirect ( & mut icon_info ) } ; crate :: Icon { handle : icon as _ , owned : true } }
Creates a new icon from the bitmap data.
Creates a new icon from the bitmap data .
&self