Skip to content

How do I change taskbar icon? #3971

Answered by emilk
0xDema asked this question in Q&A
Feb 5, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Here is the code that does the work:

/// Set icon for Windows applications.
#[cfg(target_os = "windows")]
#[allow(unsafe_code)]
fn set_app_icon_windows(icon_data: &IconData) -> AppIconStatus {
use crate::icon_data::IconDataExt as _;
use winapi::um::winuser;
// We would get fairly far already with winit's `set_window_icon` (which is exposed to eframe) actually!
// However, it only sets ICON_SMALL, i.e. doesn't allow us to set a higher resolution icon for the task bar.
// Also, there is scaling issues, detailed below.
// TODO(andreas): This does not set the …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@0xDema
Comment options

@emilk
Comment options

Answer selected by 0xDema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants