简体   繁体   中英

How to extract the icon on system tray through the iImage member of TBBUTTONINFO structure with C++ api under win7 32bit?

First of all,i have gotten the value of iImage member of TBBUTTONINFO structure.

Next,i wanna extract the icon on system tray through the iImage member of TBBUTTONINFO structure with C++ api under win7 32bit?

Is it possible and if it is,what should i do?

Thank you!

Assuming you have already injected yourself into the Explorer process you can send TB_GETIMAGELIST to the toolbar and then call ImageList_GetIcon or ImageList_GetImageInfo .

If on the other hand you have not injected into the process but are using VirtualAllocEx and ReadProcessMemory to get the toolbar info then you will have problems because you cannot easily copy GDI objects from one process to another.

This old application called TraySaver might be able to give you some help but what you are doing is not supported and can break at any point because the classname of the tray icon window and the taskbar window hierarchy is undocumented and you are not supposed to access it this way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM