English 中文(简体)
get file icon for Outlook appointment (.msg)
原标题:

I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great.

However, Outlook uses ".msg" for mail and appointment items (if you drag an email and drag an event onto your desktop, the resulting icons are different). I noticed that if I use the registry method, the standard envelope icon is at index 17 of C:WINDOWSInstaller{90120000-0011-0000-0000-0000000FF1CE}outicon.exe (on my XP machine running Outlook 2007) - and, conveniently enough, the appointment icon is at index 18. I can hardcode 18 when extracting the icon, but that sounds very flimsy.

Given the filename of an email or an appointment (but not the actual file), and knowledge that it is an email or an appointment, does anybody know how to get the correct icon, either through the shell or through the registry?

Of course, if I had the actual file handy, I could just use Icon.ExtractAssociatedIcon, but in the system I m working on, we re showing a list of files that are stored elsewhere and downloading each of them beforehand is not possible.

最佳回答

If you know when it an appointment or a mail, could you not pass "appointment.ics" into your SHFileInfo funnction and get the the right icon ? Marcus

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签