Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPReportFilterEditControl in toolbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPReportFilterEditControl in toolbar

 Post Reply Post Reply
Author
Message
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 443
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post Topic: CXTPReportFilterEditControl in toolbar
    Posted: 23 March 2005 at 8:14pm
I'm wondering if anyone has any sample code for how I might embed a CXTPReportFilterEditControl object into my CXTPToolBar. I'm running eXtreme Toolkit PRo v9.51.

Even a quick run-down of the necessary steps would be greatly appreciated.

Thanks!


Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 25 March 2005 at 1:25am
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 443
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post Posted: 25 March 2005 at 9:54am
Thanks, Oleg. This looks like exactly what I needed.
Back to Top
unicef View Drop Down
Newbie
Newbie


Joined: 17 February 2005
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote unicef Quote  Post ReplyReply Direct Link To This Post Posted: 26 March 2005 at 9:39am
Here is my solution. The advantage is that you don't need to press enter to trigger filter action. It filters whenever you input a character.

class CMyReportView : public CXTPReportView
{
...
    CXTPReportFilterEditControl m_wndFilterEdit;
...
}

int CMyReportView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
...
    if (!m_wndFilterEdit.Create(WS_TABSTOP | WS_CHILD | WS_VISIBLE | WS_BORDER,
        CRect(0, 0, 80, 20), this, ID_EDIT_FILTER))
        return -1;
    m_wndReport.GetColumns()->GetReportHeader()->SetFilter EditCtrl(&m_wndFilterEdit);
...
}

int CMyReportView::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl)
{
    if( lpCreateControl->bToolBar )
    {
        if( lpCreateControl->nID == ID_EDIT_FILTER )
        {
            if( lpCreateControl->pControl )
                return TRUE;

            CXTPControlCustom* pControlFilter = CXTPControlCustom::CreateControlCustom(&m_wndFilterEd it);
            lpCreateControl->pControl = pControlFilter;
        }
    }

    return FALSE;
}

Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 443
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2005 at 2:32pm
Thanks for that code snippet. Unfortunately, I already implemented it the other way, and am now too lazy to change it again.  ;-)

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.043 seconds.