Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Animation Issue - (http://www.programmingforums.org/showthread.php?t=15035)

pcbrainbuster Jan 25th, 2008 5:48 PM

Animation Issue -
 
Sup guys,

Recently I found out how to handle/work with dialog boxes and have run into a snag. As most of you should know; when you're setting the size of the dialog in the resource it is NOT in pixels but rather something called dialog units. This causes an issue in my program because I need to do an animation(using SetWindowPos(...)) that works with it's size. But the thing is that it's size varies computer to computer, so if I correct the animation on my computer it comes up messed on another one :(. Is there anyway to keep the animation the same/a constant on other computers?

Please help! :-|

Thanks.

Wizard1988 Jan 25th, 2008 6:28 PM

Re: Animation Issue -
 
How about using Google??


http://www.google.com/search?hl=en&q...=Google+Search

pcbrainbuster Jan 25th, 2008 8:13 PM

Re: Animation Issue -
 
I sort of got confused on the second link, could you please explain?

pcbrainbuster Jan 25th, 2008 8:15 PM

Re: Animation Issue -
 
Now that I think about it, is there a way to keep the font the same no matter what the default is?

lectricpharaoh Jan 27th, 2008 4:18 AM

Re: Animation Issue -
 
Quote:

Originally Posted by pcbrainbuster
Now that I think about it, is there a way to keep the font the same no matter what the default is?

The whole point of using dialog units is to accommodate various display properties (font size in particular).

If you've ever been presented with a fixed-size window where text or various controls run off the edge, and thereby become inaccessible, you will know the dangers inherent in assuming the user has certain settings in place. Some users may have changed the default fonts, and so long as you specify your own fonts (and these fonts are installed), this won't be a problem. A more serious issue arises when users enable font scaling, in particular to use larger-than-normal fonts for visibility (perhaps their monitor has a very fine pitch, or their vision is sub-par). This will scale up all fonts, and if you assume (or force) GDI rendering to be in terms of pixels, you'll have problems.

You should be able to convert the absolute (pixel) units to the logical (dialog) units at runtime, and adjust the positioning of your animation and controls accordingly.

pcbrainbuster Jan 27th, 2008 8:06 AM

Re: Animation Issue -
 
But I just can't seem to understand that :( Actually I have an idea; could someone please create an example in which they use WM_TIMER for animations in a dialog? Just increase the dialog by 10 dialog units in the animation, this should clear up my problems.

Thanks!


All times are GMT -5. The time now is 3:42 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC