ReportItemControl 'SetCapture' problem |
Post Reply |
Author | |
yayo
Groupie Joined: 22 December 2006 Location: Korea, South Status: Offline Points: 28 |
Post Options
Thanks(0)
Posted: 22 November 2009 at 8:32pm |
I found some faults in extreme toolkit codes.
I want for you to modify a message function as follows.
void CReportItemControlsDlg::OnItemButtonClick(NMHDR * pNotifyStruct, LRESULT*)
{ XTP_NM_REPORTITEMCONTROL* pItemNotify = (XTP_NM_REPORTITEMCONTROL*) pNotifyStruct; if(!(pItemNotify->pRow && pItemNotify->pItem && pItemNotify->pItemControl)) return; CTestDlg dlg;
dlg.DoModal(); // CTestDlg doesn't work due to receiving a messeage in ReleaseCapture(). please refer to a modified code that I attached. ...
}
I recommand as follows: BOOL CXTPReportRecordItem::OnLButtonUp(XTP_REPORTRECORDITEM_CLICKARGS* pClickArgs)
{ if (m_pItemControlHookWnd && m_pFocusedItemControl) { pClickArgs->pControl->ScreenToClient(&pClickArgs->ptClient); // yayo write :
// destroy item control window
ReleaseCapture(); m_pFocusedItemControl->OnLButtonUp(pClickArgs); // XTP_NM_REPORT_ITEMBUTTONCLICK // yayo
// destroy item control window //ReleaseCapture(); m_pItemControlHookWnd->DestroyWindow(); delete m_pItemControlHookWnd; m_pItemControlHookWnd = NULL; return TRUE; } |
|
hi
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Can't confirm - try this:
void CReportItemControlsDlg::OnItemButtonClick(NMHDR * pNotifyStruct, LRESULT*) {XTP_NM_REPORTITEMCONTROL* pItemNotify = (XTP_NM_REPORTITEMCONTROL*) pNotifyStruct; if (!(pItemNotify->pRow && pItemNotify->pItem && pItemNotify->pItemControl)) return; if (AfxMessageBox(_T("AfxMessageBox"), MB_OKCANCEL) != IDOK) return;switch(pItemNotify->pItemControl->GetIndex()) ........................ |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |