15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


StatusBars

jshao@pluto.dspt.com
Tuesday, June 18, 1996


Visual C++ 4.0 MFC 4.0

My application needs a StatusBar having dynamic number of panes (from 
minimum of 1 to a maximum of 10 panes) to display different kind of 
information in different time.

At first, I thought it is easy: 

Just declare a static  UINT array having ten indicators' IDs.
During run-time, if any pane is not needed, set that pane's width to zero:

    m_wndStatusBar.SetPaneInfo( 0, nID, SBPS_DISABLED|SBPS_NOBORDERS,0);

where m_wndStatusBar is the StatusBar object.	

But when I use this method, the pane is not completely disppeared. It 
still left small space around this pane.

Is there any easy way to make any unnecessary pane completely disppear?


Thank you for your help!

James Shao 
DSP Technology




Tam Do -- tamdo@knoware.nl
Monday, June 24, 1996

At 15:30 18-06-96 -0400, you wrote:
>
>Visual C++ 4.0 MFC 4.0
>
>My application needs a StatusBar having dynamic number of panes (from 
>minimum of 1 to a maximum of 10 panes) to display different kind of 
>information in different time.
> ...
>But when I use this method, the pane is not completely disppeared. It 
>still left small space around this pane.
>
>Is there any easy way to make any unnecessary pane completely disppear?

void CMainFrame::OnUpdateLevel(CCmdUI* pCmdUI)
{
	// It is necessary to enable the level status bar pane, so that
	// the text will be displayed.
	pCmdUI->Enable();
}

In your case:

        pCmdUI->Enable(FALSE);
Tam Q. Do
Atlas Software B.V.
The Netherlands






| Вернуться в корень Архива |