[GUITK1.6]CGuiImageLinkButton总是Fire两次

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;

}


posted on 2009-04-08 21:43  尚祚彦  阅读(141)  评论(0编辑  收藏  举报

导航