Click here to Skip to main content
12,348,850 members (63,388 online)
Click here to Skip to main content

Stats

121.1K views
1.9K downloads
36 bookmarked
Posted

A Multiple Substring Search Class: CIVStringSet

, 25 Apr 2010 CPOL
A string array class using MFC or STL that performs very fast multiple string searches
// StringSetSampleDlg.h : header file

#pragma once

#include "StringSet.H"

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CStringSetSampleDlg
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

class CStringSetSampleDlg : public CDialog
{
    // Construction
public:
    CStringSetSampleDlg( CWnd * pParent = NULL ) ;  // standard constructor

    // Dialog Data
protected:
    enum { IDD = IDD_STRINGSETSAMPLE_DIALOG } ;
    CEdit       m_editSearch ;
    CString     m_strSearch ;
    CEdit       m_editSeekTokens ;
    CListBox    m_lbSeekTokens ;
    CListBox    m_lbFoundTokens ;
    CIVStringSet m_setStrings ;

    // ClassWizard generated virtual function overrides
protected:
    virtual void DoDataExchange( CDataExchange * pDX ) ;    // DDX/DDV support
    virtual BOOL OnInitDialog() ;

    // Implementation
protected:
    HICON m_hIcon ;

    afx_msg void OnSysCommand( UINT nID, LPARAM lParam ) ;
    afx_msg void OnPaint() ;
    afx_msg HCURSOR OnQueryDragIcon() ;
    afx_msg void OnKillFocusStringsToSeek() ;
    afx_msg void OnSearch() ;
    DECLARE_MESSAGE_MAP()
} ;

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Scot Brennecke
Software Developer (Senior) Microsoft
United States United States
Scot is a Sr. Escalation Engineer for the Microsoft Developer Support Languages team. He helps software developers who are Microsoft customers find bugs in their own, or Microsoft's, code.

Scot spends most of his time writing, reading, or thinking about C++ software, thereby classifying him as a geek.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160621.1 | Last Updated 25 Apr 2010
Article Copyright 2002 by Scot Brennecke
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid