If a WM_SETTINGCHANGE message is sent to a toolbar it can sometimes enter a
race condition from within MFC. This is because MFCs
SendMessageToDescendants function enumerates all childs with
GetNextWindow(hWndChild, GW_HWNDNEXT) and then intersperses a SendMessage
call.

However the toolbar can respond to a WM_SETTINGCHANGE by changing the ZORDER
of the windows which can lead to the GetNextWindow list enumeration never
terminating.

I adjusted the toolbar code to prevent it from gratuitously changing the
ZORDER.

Dave Hawkes
Cadlink Technology

toolbar.diff

Reply via email to