Shell_NotifyIcon
OK. I have a hunch that the reason why this fails is because the taskbar is not ready to add the icon(for some reason or another) and thus times out one me. So, in order to... get around this, I have the program to try to set the icon 3 times, with 1 second delay in between each try. Hopefully, this'll solve it. I've looked around on the web, and it seems I'm not the only one with this problem... and apparently there's no real solution to it. @_@
Active Desktop
Erick told me that it would be nice for it to work with Active Desktop, so I added code to set the wallpaper using IActiveDesktop::SetWallpaper() routine. As far as I know, it sets it centered, not tiled, not stretched, centered. The scaling and converting to BMP is done by the Background App (since Active Desktop won't align them and stuff like I do with Center Tiling on). Only the actual setting of the background is done with IActiveDesktop::SetWallpaper(). I haven't thoroughly tested it. Erick says that if I make it hide the icons on the desktop, that means that Active Desktop is Active. I tried that, and changing wallpaper with the Background App works. So, I'm assuming it works... hopefully
PNG Support
Added PNG support using lodePNG library. It's slow. I have to plot the pixels on the BITMAP object myself. Whenever this program loads a PNG file, it'll slow down a bit, since it means it's plotting the pixels using SetPixel(x, y, color). Well, it's a nice alternative as opposed to having to load the PNG library, zlib library, etc. I'm happy with it... except for the speed. Oh well, guess can't be helped. Just cope with it. lol ^-^
Dialog code
I added a ResetControls code so that when you press Cancel, it'll actually do that and not just hide the options dialog. And I moved all of the variable passing to a struct. It was a pain to do so.
Unknown Error
When I run the Debug version of the app, it runs fine, for hours and hours on end... but just now, with the Release version... it crashed. @_@ Don't know why, looking into it. So far, I have no idea why. It appears to be random, and that sucks... It works fine with the Debug version though... @_@ *sigh*... should have released later... *sigh* oh well, too late now. Try the app and see if it works for you. Maybe it's me and Vista. I don't know... Somebody look through my code and tell me what I did wrong @_@ It always crashes at the point when Debug message says "Scaling image file...." thingie... *sigh*... what a bummer. 2 years in the army and now that I'm trying to get back into this... I'm greeted with this. -_-
Subscribe to:
Post Comments (Atom)
2 comments:
Managed to track it down to CopyChars of atlsimpstr.h, meaning it halts whenever it does something with a CString object... and also, it only happens when trying to set a PNG file. -_- It works well in Debug mode... why not in Release mode? >o<
The lodePNG library doesn't use CString objects at all, so... why the access error with a CString object? @_@ I don't get it...
If this never gets solved... might as well ship the Debug version... -_-
Done. Figured it out. Optimizations geez... can't believe that it would crash because of Optimizations... *sigh*
Post a Comment