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 General Discussion » Some questions. (CRebar/CAnimateCtrl/IE style, free version) Collapse All
Subject Author Date
jh park Aug 3, 2003 - 7:03 AM

-------------------------------------------------------------------------------------------------
1. CAnimateCtrl support? (like IE style for Logo animation)
=> How to add CAnimateCtrl in Menubar or Toolbar

-------------------------------------------------------------------------------------------------
2. CRebar or CCoolbar support? (like IE style)

// sample
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
// ...
// create m_wndToolBar & m_wndMenuBar;

// add to CRebar
if (!m_wndReBar.Create(this, RBS_BANDBORDERS, WS_CHILD | WS_VISIBLE |
WS_CLIPCHILDREN | WS_CLIPSIBLINGS | CBRS_ALIGN_TOP)
|| !m_wndReBar.AddBar(&m_wndMenuBar)
|| !m_wndReBar.AddBar(&m_wndToolBar, NULL, (CBitmap*)NULL, RBBS_BREAK))
{
TRACE0("Failed to create rebar\n");
return -1; // fail to create
}

// ...

//m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY);
//m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);

// ...

if(!CExtControlBar::ProfileBarStateLoad(this, pApp->m_pszRegistryKey,
pApp->m_pszProfileName, pApp->m_pszProfileName, &m_dataFrameWP))
{
//DockControlBar(&m_wndMenuBar);
//DockControlBar(&m_wndToolBar);    
}

// ...

return 0;
}

=> Not Menu Click (menu item is disabled)
=> Not Toolbar Click
=> Not appeared Windows 2003 style

-------------------------------------------------------------------------------------------------
Thank you...

Sergiy Lavrynenko Aug 5, 2003 - 1:43 AM

Hi,

Toolbar/menubar was designed to emulate the MS Office 2000/XP/2003 or Visual Studio .NET toolbars. If you have this toolbar - rebars become obsolete. In fact nobody have requested the rebar compatibility feature.

About the animation control in the menu bar: Any toolbar recalculates positions of its buttons in the _RecalcPositionsImpl() virtual method. CExtMenuControlBar overrides this method for correct repositioning of the last button in MDI applications (CExtBarMdiRightButton object which holds the minimize/maximize/restore/close button-like areas).

To implement the animation button you should:


  • Insert a new button into menu bar (it should be last) and assign the created animation control to this button (similar operation with the comboboxes can be found in the samples);

  • Use your own class derived from CExtMenuControlBar and implement _RecalcPositionsImpl() similar to CExtMenuControlBar:: _RecalcPositionsImpl(); Overriden method should shift the last button with animation control into correct position;



This task is a bit advanced task. If you will have difficulties, you may write me a letter and I will help you.

Best regards,
Sergiy.