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

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


Help: Toolbar Activation Problem

Chet Murphy -- cmurphy@modelworks.com
Friday, July 19, 1996

Environment VC++ 4.1, Windows 95

I have an MFC app that has been activating its tool bar buttons correctly,
but last Wednesday when I installed IE3 beta 2 the tool bar no longer
responds correctly under Windows 95.  I'm not doing anything fancy with the
tool bar, I just create a standard toolbar (CToolBar) in my main frame and
load it from a resource.  BTW: The tool bar works just fine under Window NT
4.0 beta.

I have checked the code and as best that I can tell the behavior is
correct.  My update handlers are being called for tool bar updates (i.e.,
pCmdUI->m_pOther is a CToolBar).  When a change in status occurs in a tool
button, the button rectangle is invalidated - its just that no drawing is
taking place.  If I minimize the app and then open it again the tool bar
buttons are highlighted correctly for the current state of the document.

Not only are the tool bar buttons not being highlighted correctly they are
also not being unhighlighted correctly.  It usually takes several
selections before the edit buttons are highlighted and then when the
selection is removed the edit buttons stay highlighted.

Is anybody else having this problem?  Is there a workaround?  I need to
ship this app early next week so time is important.

BTW: I have tried accessing the CToolBarCtrl directly in my update handler
and calling its routines using the following code:

	if (pCmdUI->m_pOther)
	{
		CToolBar* toolBar = (CToolBar*)pCmdUI->m_pOther;
		ASSERT_KINDOF(CToolBar, toolBar);

		UINT style = toolBar->GetButtonStyle(pCmdUI->m_nIndex);
		UINT state = HIWORD(style);

		if (state != 0)
		{
			CToolBarCtrl& ctrl = toolBar->GetToolBarCtrl();
			ctrl.EnableButton(pCmdUI->m_nIndex, TRUE);
			CRect rect;
			ctrl.GetItemRect(pCmdUI->m_nIndex, rect);
			toolBar->InvalidateRect(rect);
			toolBar->UpdateWindow();
		}
	}

So far this does not seem to be a solution.

Chet Murphy
ModelWorks Software
cmurphy@modelworks.com
http://www.modelworks.com/express





Manos D. Anastasiadis -- manos@ced.tuc.gr
Friday, July 26, 1996

Well, the DLL causing the infamous toolbar problem _is_

comctl32.dll dated 14/07/96, version 4.70.1115

Among the things that have changed since the previous
version is the removal of those nice -speaking for 
myself- animations in the list, tree and tab controls...

A funny thing about the toolbar problem I have noticed
is that it does occur _only_ to apps which use the
ToolbarWindow32, not a (possible) subclass (?) of
it (anyway, I mean MS Word & MS Excel.) This makes
me think that there *might* be a bad MFC wrapping code
that *might* just show up now for some reason, such
as optimization of the control's code.

The _most_ possible cause I might think is that MS
shipped the wrong version of the DLL! Browsing at the
files properties for a clue, I bumped on the 
"Product Name" information, which 'proudly' reads:
"Microsoft(R) Windows NT(TM) Operating System"
instead of the expected:
"Microsoft? Windows? Operating System".
Since they have already recognized this bug, I hope
they can just allow the new version of the DLL
to be downloaded, instead of letting us wait for
days and download a 4Mb+ file for just a DLL....

/*==================================*
 * Manos D. Anastasiadis            *
 * Computer Engineering Dept.       *
 * Technical University of Crete    *
 * Mu.S.I.C.                        *
 * manos@ced.tuc.gr                 *
 *==================================*/




Roger Onslow -- Roger_Onslow@compsys.com.au
Tuesday, July 30, 1996

Toolbar problem is a known problem with MS Internet Explorer 3.0 Beta 2

MS know of the problem and it will be rectified in the next release (we hope).

Apparently, Beta 2 won't work with old dll (haven't tried, though), so, for the 
moment, you have to choose what you want -- new explorere or toolbars that 
display properly.

Roger Onslow
Rogero@compsys.com.au





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