Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Animating windows help

This topic is 5997 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im having trouble trying to find a way of "sliding" a window out of the side of my main window. At the moment I have 2 regions 1 the default region and one slightly larger to the right so that when the mouse moves over to the right and off the window the region is changed to increase the size of the window (where i have a calculator and a notepad). The problem is when the mouse moves to this position the notepad and calc just pop into view, I want to be able to slide or maybe even pull these views from the main window. I can think of 2 ways of doing this: 1)When the mouse moves over to the right instead of using SetWindowRgn() with the new region, I could create a window with the dimensions of say the calc but draw the desktop window over it and therefore i would have an invisible window that i can draw on and then over a period of a few seconds draw the window sliding out. 2)Over a few seconds i can SetWindowRgn() to include a 1 pixel column (or 2 or 3 etc) at the right until i have the full region I want. The problem with both of those ideas is that neither sound like a good way of doing it. Im leaning towards the first idea a bit more as setting the region a couple of pixels bigger ever second sounds a bit too drastic and I will probably get mad flickering. But the first way doesnt sound very good either. I cant think of anything ive seen that I can use as an example of this and im sure I havent explained it very well, but if anyone has any ideas I would be most grateful for your help. Thanks Edit: Hmmm it seems like my first idea is not feasible. I (stupidly)didnt realise the hdc of the desktop window includes whatever is on the desktop (including my new window) so when i copy from that hdc to my window hdc i am copying an image of my window. [edited by - Zeke on July 18, 2002 11:21:06 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!