Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TraceEventType Icons

Status
Not open for further replies.

woogoo

Programmer
Feb 14, 2004
247
GB
Hi All,

I have a log file that contains various TraceEvents and I would like to include the appropriate Icon when displayed in the log file viewer (a ListView with a smallImageList). I'm looking for icons such as Stop, Start, Critical, Information etc. But I need to get these icons in the first place so I can load them in to the ImageList, does anyone know where they are and or how I can obtain them?

--



woogoo
 
Most of them (if not all) are resources in <windows-dir>\system32\shell32.dll

This dll is already loaded by most applications by default.
So try GetModuleHandle("shell32") first to get it's HMODULE.
If that fails, call LoadLibrary("shell32") (Don't specify a path) to load it and get it's HMODULE.

Using the HMODULE (which is the same as the HINSTANCE you need for the Load... calls), call LoadIcon or LoadImage to load the icons you need.

I don't know which icons you need; try find out the required MAKEINTRESOURCE-values yourself. If you have problems with this, please post exactly the icons you need and i will figure them out for you.



Marcel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top