Get application icon from ProcessSerialNumber
Posted
by Thomi
on Stack Overflow
See other posts from Stack Overflow
or by Thomi
Published on 2010-03-16T09:53:11Z
Indexed on
2010/03/16
9:56 UTC
Read the original article
Hit count: 299
I would like to get the application icon for all foreground applications running on my Mac. I'm already iterating over all applications using the Process Manager API. I have determined that any process that does not have the modeBackgroundOnly
flag set in the processMode
(as retrieved from GetProcessInformation()
) is a "foreground" application, and shows up in the task switcher window.
All I need is an API that gives me a CImageRef (or similar) that contains the application icon for a process. I'm free to use either carbon or cocoa APIs.
© Stack Overflow or respective owner