Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » AVI in menu bar Collapse All
Subject Author Date
Thomas Fuchs Mar 25, 2005 - 8:13 AM


Hello there,


I would like to play an AVI in the menu bar in the way Internet Explorer does. Any chance?


Best regards,
Thomas

Technical Support Mar 25, 2005 - 10:43 AM

This can be done in two ways. In either case, you need to use a CExtMenuControlBar-derived class.

The first way is based on using a timer and painting (manually) extracted AVI frames in the non-client area of the menu bar. But it’s not very handy.

Another way is to insert CExtBarButton into the menu bar, attach an AVI player control to it and make it stick to the right/bottom side of the menu bar. So, you need to override the CExtMenuControlBar::_UpdateMenuBar() internal virtual method. In this method, first, call its parent method and then insert a newly created menu bar button with an AVI player control. Besides, you need to override the CExtMenuControlBar::_RecalcPositionsImpl() virtual method which computes positions of each buttons. We assume your button should always be the last button in the menu bar so you can invoke its SetRect() method to move it to the right/bottom side.

If you encounter any difficulties, just let us know and we will help you.

Please note that IE’s menu bar cannot be floating, so if you plan to leave your menu bar floating, you will face the question on choosing an appropriate location for the AVI button.