I'm setting the HKEY_CLASSES_ROOT\.ext\DefaultIcon to the path of my application and it works...for the most part.
// create the HKEY_CLASSES_ROOT\extension
RegistryKey k = Registry.ClassesRoot.CreateSubKey(".spr");
k.SetValue("", "SpaceRead"); // set the default to the program name
RegistryKey di = k.CreateSubKey("DefaultIcon");
di.SetValue("", Application.ExecutablePath);
di.Close();
k.Close();
My problem is that my icon is showing up 'inside a white page' instead of only showing my icon (and losing the page)
here's an example. The first icon is mine, the second one is what I want.
My .ico file has all the standard resolutions in it, but I don't think that's the problem since even small icon views show the 'page' background.
Is there some custom icon rendering going on that I don't know about?
BTW, this is a Windows 7 x64 machine.