Can't edit in report control |
Post Reply |
Author | |
garylyb
Newbie Joined: 23 August 2006 Status: Offline Points: 17 |
Post Options
Thanks(0)
Posted: 13 September 2006 at 11:25pm |
I have a report control in a CFormView,
It looks like I'm doing the same things as the task list sample
pCol->SetEditable(TRUE); pCol->GetEditOptions()->m_bAllowEdit = TRUE; I set allowedit:
m_Report.AllowEdit(TRUE); m_Report.Populate(); But, when I click on a cell, it looks like it starts to edit, but when I press a key I always get an exception here:
void CXTPReportInplaceEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{ CXTPReportControl* _pControl = pControl; ASSERT(_pControl); Because pControl is NULL
I don't know what's going on?
|
|
garylyb
Newbie Joined: 23 August 2006 Status: Offline Points: 17 |
Post Options
Thanks(0)
|
Something is eating messages here, Here is atrace of the task list sample: <00738> 00A905F0 R WM_NOTIFYFORMAT retCode:NFR_ANSI
<00739> 00A905F0 S WM_NCHITTEST xPos:623 yPos:153 <00740> 00A905F0 R WM_NCHITTEST nHittest:HTCLIENT <00741> 00A905F0 S message:0x2A48 [User-defined:WM_USER+9800] wParam:00000000 lParam:00000000 <00742> 00A905F0 R message:0x2A48 [User-defined:WM_USER+9800] lResult:00000000 <00743> 00A905F0 S WM_NCHITTEST xPos:620 yPos:148 <00744> 00A905F0 R WM_NCHITTEST nHittest:HTCLIENT <00745> 00A905F0 S WM_SETCURSOR hwnd:00A905F0 nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE <00746> 00A905F0 R WM_SETCURSOR fHaltProcessing:False <00747> 00A905F0 P WM_MOUSEMOVE fwKeys:0000 xPos:237 yPos:11 <00748> 00A905F0 S WM_NCHITTEST xPos:620 yPos:148 Here is my app:
00340> 00B5078E R WM_SETCURSOR fHaltProcessing:False
<00341> 00B5078E S WM_NCHITTEST xPos:407 yPos:548 <00342> 00B5078E R WM_NCHITTEST nHittest:HTCLIENT <00343> 00B5078E S WM_NCHITTEST xPos:407 yPos:548 <00344> 00B5078E R WM_NCHITTEST nHittest:HTCLIENT <00345> 00B5078E S WM_SETCURSOR hwnd:00B5078E nHittest:HTCLIENT wMouseMsg:WM_MOUSEMOVE <00346> 00B5078E R WM_SETCURSOR fHaltProcessing:False <00347> 00B5078E P WM_MOUSEMOVE fwKeys:0000 xPos:180 yPos:32 <00348> 00B5078E P WM_PAINT hdc:00000000 <00349> 00B5078E S WM_NCHITTEST xPos:407 yPos:548 These messages are missing:
<00742> 00A905F0 R message:0x2A48 [User-defined:WM_USER+9800] lResult:00000000
This is a tab in a
CXTPTabControl in an mdi window.
Gary
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
This problem can appear beacuse of clip styles - check that report, tabcontrol and view have WS_CLIPSIBLINGS|WS_CLIPCHILDREN styles
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
garylyb
Newbie Joined: 23 August 2006 Status: Offline Points: 17 |
Post Options
Thanks(0)
|
I just uploaded a file in the support area that demonstrates the problem. OnInitialUpdate gets hit twice, the report control can't be edited, the windows are all set to WS_CLIPSIBLINGS|WS_CLIPCHILDREN I can't get any farther until this gets resolved. Thank you Gary |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
You didn't copy one method from our sample:
ON_WM_MOUSEACTIVATE() ...
int CTest1View::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message){ return CWnd::OnMouseActivate(pDesktopWnd, nHitTest, message);} |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
About WM_INITIALUPDATE - just comment
pWnd->SendMessage(WM_INITIALUPDATE) in CTest1View::AddView. We fixed it in our sample too.
Thanks.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
garylyb
Newbie Joined: 23 August 2006 Status: Offline Points: 17 |
Post Options
Thanks(0)
|
Thank you very much, I looked at the OnMouseActivate several times, and kept saying it doesn't do anything, so I ignored it.
It does, however, call CWnd instead of CView, so once that finally sunk in, I added it.
Thanks again,
Gary
|
|
TerryT
Newbie Joined: 31 August 2006 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
Ditto on the "finally sunk in"
Restored the "OnMouseActivate()", all is fine!
Thx!
|
|
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 |