1

On my computer the winuser.h filed is stored in: C:\MinGW\include\winuser.h, there the declarations of all the icons which can be used in the last argument of MessageBox(), see: link, is stored. I wonder what file the definitions of those icons are stored and where the file is located. photo of the declaration of MB_ICONASTERISK in "vs.": enter image description here

Noah.Ehrnstrom
  • 172
  • 1
  • 12
  • Definition of what? Could you show us the declaration you're talking about? – Aykhan Hagverdili Apr 24 '20 at 15:57
  • I've updated the post. – Noah.Ehrnstrom Apr 24 '20 at 16:04
  • When you have the "WinUser.h" file open, just try to "Save As..." the file and you will see where the file is located (it will be shown in the Save As popup). Its location will vary according to project settings and the selected SDK. – Adrian Mole Apr 24 '20 at 16:10
  • 1
    Be aware that those images are operating system resources, so Microsoft may (and has in the past) changed them without telling people who fail to use an approved API to retrieve them. – JaMiT Apr 24 '20 at 16:14
  • 1
    I tracked the call graph of `MessageBox` to `user32.dll!SoftModalMessageBox` which calls `user32.dll!LoadIcoCur`; it looks like the icons are resources in user32.dll but I don't see an *official* API to grab them. – nanofarad Apr 24 '20 at 16:16
  • It's usually in the Windows SDK. You can check that here: https://www.magnumdb.com/search?q=MB_ICONASTERISK (check the "File Path" checkbox to see where it's defined from) – Simon Mourier Apr 24 '20 at 16:32
  • Thank you, nanofarad, that is exactly what i wanted to know. – Noah.Ehrnstrom Apr 24 '20 at 17:52

0 Answers0