How do I get a proper icon?

Igor Korot 56 Reputation points
2023-02-22T14:18:35.25+00:00

Hi, ALL,

All application available that works with IO have an icon on the toolbar to perform "save" operation.

That icon looks like a floppy disk. (Take a look at the MSVC, MS Word, etc). This is true not for MS apps but for any other OS.

It becomes de-facto standard.

However, it looks like MS itself does not have it available in their stock icon set. Take a look here, for example: https://learn.microsoft.com/en-us/windows/win32/api/shellapi/ne-shellapi-shstockiconid.

Or there is another place where different set of stock icons are available?

What other people do? And how does MS does it themselves?

Thank you.

Windows development Windows API - Win32
{count} votes

2 answers

Sort by: Most helpful
  1. Castorix31 90,681 Reputation points
    2023-02-23T09:44:25.77+00:00

    Old/standard Win32 apps use standard buttons images : Toolbar Standard Button Image Index Values

    Recent apps like UWP use symbols/fonts : https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.symbol?view=winrt-22621

    (and Icons for Windows apps)

    like ScreenSketch for example :

    ScreenSketch_Test

    1 person found this answer helpful.

  2. Xiaopo Yang - MSFT 12,731 Reputation points Microsoft External Staff
    2023-02-23T03:26:48.2433333+00:00

    Hello,

    Welcome to Microsoft Q&A!

    The icon is in systemroot\system32\wmploc.dll. You can load these icons by LoadImage.

    MicrosoftTeams-image (18)

    Thank you.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.