[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

::TrackPopupMenu() and TPM_NOANIMATION

Posted on 2000-03-30
7
Medium Priority
?
611 Views
Last Modified: 2012-05-04
Hi,

I want to use Popup menu without animation. In MSDN (January 1999) I'm find:

Windows 98, Windows NT 5.0 and later: Use one of the following flags to modify the animation of a menu. Value Meaning
TPM_HORNEGANIMATION Animates the menu from left to right.
TPM_HORPOSANIMATION Animates the menu from right to left.
TPM_NOANIMATION Displays menu without animation.
TPM_VERNEGANIMATION Animates the menu from bottom to top.
TPM_VERPOSANIMATION Animates the menu from top to bottom.

I want to use TMP_NOANIMATION, but I can't find where this constant defined (There is no *.h file where this constant defined).

Q: How can I get OS version and disable animation (For W98 or NT50)?

I'm using VC60 with SP3.

Thanks
0
Comment
Question by:mahno
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 31

Expert Comment

by:Zoppo
ID: 2669454
Hi mahno,

to get state of or disable menu animation you can use SystemParametersInfo(SPI_SETMENUANIMATION) // or SPI_GETMENUANIMATION ...

Unfortunately I didn't found one of these 5 TPM_* defines...

ZOPPO
0
 
LVL 1

Author Comment

by:mahno
ID: 2672879
Hi ZOPPO,

Constants: SPI_SETMENUANIMATION, SPI_GETMENUANIMATION are not defined too.

May be U know it's numeric values?

mahno


0
 
LVL 31

Expert Comment

by:Zoppo
ID: 2672888
I found them defined in WinUser.h:

#if(WINVER >= 0x0500)
....
#define SPI_GETMENUANIMATION                0x1002
#define SPI_SETMENUANIMATION                0x1003
....
#endif /* WINVER >= 0x0500 */

ZOPPO
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Author Comment

by:mahno
ID: 2679440
Hi Zoppo,

I'm found these define too. But, it does not work:

BOOL bAnim = FALSE;
int rc = SystemParametersInfo(0x1003/*SPI_SETMENUANIMATION*/, 0, (PVOID)&bAnim, 0);

If I try to get animation state:

int rc = SystemParametersInfo(0x1002/*SPI_GETMENUANIMATION*/, 0, (PVOID)&bAnim, 0);

I still recieve TRUE. I'm working over W98. Any ideas?

regards,
  mahno
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 2679470
To set the state pass the value directly, not via pointer:

BOOL bAnim = FALSE;
int rc = SystemParametersInfo(0x1003/*SPI_SETMENUANIMATION*/, 0, (PVOID)bAnim, 0);

hope that helps,

ZOPPO
0
 
LVL 1

Author Comment

by:mahno
ID: 2679569
Thanks Zoppo, now it's worked.

regards,
  mahno
0
 
LVL 31

Accepted Solution

by:
Zoppo earned 200 total points
ID: 2679575
no problem, you're welcome               :)
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question