Breaking News

Animated Desktop Screenmates Performance

среда 09 января admin 26
Animated Desktop Screenmates Performance Rating: 5,0/5 9641 votes

Jan 29, 2019  When you have a lot of work to do, or you are just bored out of your mind, even small distractions can help you get through the day, such as an animated desktop companion. These screenmates come.

Thanks again Fel!!! I'b probably going to have to try Less's idea though and I'll tell you why.

Bluestacks buat ram 1gb ddr2. Full Description: Bluestacks: Aug. Replace it will “FALSE” and press enter. Save the new file.

When making screenmates, the screenmate is active and moving. What I'm doing is trying to create an animated desktop. Basically is a static image (by static I mean that the object is not moving) but the pixels change.

So my problem was trying to figure out how a user could still move icons over the image so at least it would appear like a desktop, but alas if I can't get Less's idea to work then at least I'll use regions so that only the portion of the animated desktop will be 'uncoverable'. This way only desktop icons will be affected and not windows that the user pops up. I figured it out myself, mostly because I was curious after a friend asked me how you make one, and I realized I didn't know, hehe. I did get the region-blitting information off of Codeguru, which is a great MFC site.

Basically what you're doing with the bitmap is using it as a sort of template to blit out the regions of a window. Just like you would do transparent blitting. Less's suggestion is better if you have no intention of allowing the user to interact in any way with your overlays. Fel, I noticed two 'scrunched' bitmaps in the package - is the ball supposed to compress when it 'hits' the bottom of the screen? Or are those leftovers or expansion possibilities?

Bolt - here's another thought off the top of my head - if your goal is to animate the desktop perhaps generating a bitmap in memory and then setting it as the wallpaper might be the way to go. I don't know if that's possible - I've never programmatically set the desktop wallpaper - but I imagine that it's possible - it's probably a matter of tweeking a registry setting. Here's the C source for a prog that 'clears' the desktop that I found in a newsgroup. Basically it gets a handle to the desktop window and hides it. You'll have to tweek it to suit your needs, but perhaps you can build on this to blit to the desktop dc. I just had another thought along those same lines Less, Fel. What if I could somehow get the MemDC where the bitmap for the desktop is loaded?

Is the bitmap considered a child window of the desktop? If so would EnumChildwindow() be the way?

I am assuming that since the desktop is a window that it has to load the bitmap into some MemDC (I can't believe it wold constantly load from the hard drive) so now the question Fel, and Less is how can I get access to that MemDC. Once I get it.the rest would be as simple as bltting to and from the surface!!! That would make life so wonderful (hehe) ~Bolt. Bolt - It's not the MemDC that you want but the HDC. Once you have that, you could blit your MemDC to that HDC.

Your MemDC would be the backbuffer - that is what you would write on and when finished you would then blit that to the HDC. I think that code to clear the desktop lays down the path to the HDC that you want. Here's the parental chain: HWND hwndProgMan = FindWindow('ProgMan', NULL); HWND hwndShellDef = FindWindowEx(hwndProgMan, NULL, 'SHELLDLL_DefView', NULL); HWND hWndLV = FindWindowEx(hwndShellDef, NULL, 'SysListView32', NULL); The icons are part of the SysListView32 window - that code above merely toggles the visibility of that window.

When that window is invisible - the icons are too - but the wallpaper still shows through. That tells me that the wallpaper is likely displayed as part of one of the two parent windows. Looking at the SHELLDLL_DefView window using that WinSpy program that I mentioned in the other thread, it turns out that the SHELLDLL_DefView window class uses the CS_PARENTDC style. According to the docs, that style sets the clipping rectangle of the child to that of the parent so that the child can draw on the parent. This doesn't mean that the child gets the parents dc or dc settings.

The child gets it's own dc as it ordinarily would - the style is supposed to enhance performance - because the child window is clipped differently - the docs are kind of vague on this - At any rate - that window is likely the one that holds the wallpaper - and since you now know how to get the HWND to it, you can get the HDC to it from that and from there blit your MemDC to that. Give it a shot, see what happens. If it's not the SHELLDLL window then it's the ProgMan window - looking at the classinfo for those windows - the ProgMan window class uses COLOR_BACKGROUND as the background brush and the SHELLDLL window uses COLOR_WINDOW as the background brush - the docs don't say much about those brushes specifically. If it's not either of those windows, then it might be the sibling window to to the listview - whose class is 'Internet Explorer_Server' Time for some experimentation. Let me know what comes of it. //edit: let _us_ know [edited by - lessbread on September 12, 2002 10:45:24 PM].