Solved

::TrackPopupMenu() and TPM_NOANIMATION

Posted on 2000-03-30
7
604 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 50 total points
ID: 2679575
no problem, you're welcome               :)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

730 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