Trait winsafe::prelude::comctl_shell_Himagelist
source · pub trait comctl_shell_Himagelist: comctl_Himagelist {
// Provided method
fn add_icons_from_shell(
&self,
file_extensions: &[impl AsRef<str>]
) -> SysResult<()> { ... }
}
Available on crate features
comctl
and shell
and kernel
only.Expand description
This trait is enabled with comctl
and shell
features, and provides
methods for HIMAGELIST
.
Prefer importing this trait through the prelude:
use winsafe::prelude::*;
Provided Methods§
sourcefn add_icons_from_shell(
&self,
file_extensions: &[impl AsRef<str>]
) -> SysResult<()>
fn add_icons_from_shell( &self, file_extensions: &[impl AsRef<str>] ) -> SysResult<()>
Calls SHGetFileInfo
to retrieve one or more
shell file icons, then passes them to
AddIcon
.
§Examples
use winsafe::{self as w, prelude::*, co};
let mut himgl = w::HIMAGELIST::Create(
w::SIZE::new(16, 16),
co::ILC::COLOR32,
1,
1,
)?;
himgl.add_icons_from_shell(&["mp3", "wav"])?;
Object Safety§
This trait is not object safe.