Print Page | Close Window

CXTPReportFilterEditControl in toolbar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2021
Printed Date: 07 November 2025 at 5:08pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPReportFilterEditControl in toolbar
Posted By: markr
Subject: CXTPReportFilterEditControl in toolbar
Date 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!





Replies:
Posted By: Oleg
Date Posted: 25 March 2005 at 1:25am
http://forum.codejock.com/uploads/oleg/2005-03-25_012516_rc3.zip - 2005-03-25_012516_rc3.zip

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: markr
Date Posted: 25 March 2005 at 9:54am
Thanks, Oleg. This looks like exactly what I needed.


Posted By: unicef
Date 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;
}



Posted By: markr
Date 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.  ;-)




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net