BOOL CGuiWorkPanel::OnCommand(WPARAM wParam, LPARAM lParam)
{
HWND hwnd = (HWND) lParam;
for (int i=0; i < m_nItems;i++)
{
if (((CComponents*) m_arrContainer[i])->m_cwnd->m_hWnd
== hwnd)
{
int x=((CComponents*) m_arrContainer[i])->m_cwnd->GetDlgCtrlID();
#if 0
CWnd* pParent= GetParent();
pParent->SendMessage (WM_COMMAND,x);
AfxGetMainWnd()->SendMessage(WM_COMMAND,x);
#else
AfxGetMainWnd()->SendMessage(WM_COMMAND,x);
#endif
return TRUE;
}
}
if (wParam == ID_GUI_TOOLUP)
OnUp();
if (wParam == ID_GUI_TOOLDOWN)
OnDownd();
return FALSE;
}