Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Serach implementation

Serach implementation

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    johnalek
    wrote on last edited by
    #1

    Hi All How to implement search functionality to text on the editbox

    #sanroop#

    L E K 3 Replies Last reply
    0
    • J johnalek

      Hi All How to implement search functionality to text on the editbox

      #sanroop#

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Your question makes little sense, please try and explain what you are trying to achieve.

      txtspeak is the realm of 9 year old children, not developers. Christian Graus

      1 Reply Last reply
      0
      • J johnalek

        Hi All How to implement search functionality to text on the editbox

        #sanroop#

        E Offline
        E Offline
        Eugen Podsypalnikov
        wrote on last edited by
        #3

        The found index or (-1) will be returned :) :

        int CYourWnd::TryToFindInBox(const CString& cszWhat)
        CString cszBoxText;
        GetDlgItemText(IDC_EDIT1, cszBoxText); // IDC_EDIT1 is ID of your box
        return cszBoxText.Find(cszWhat);
        }

        Check your definition of Irrationality[^] :) 1 - Avicenna 5 - Hubbard 3 - Own definition

        1 Reply Last reply
        0
        • J johnalek

          Hi All How to implement search functionality to text on the editbox

          #sanroop#

          K Offline
          K Offline
          KingsGambit
          wrote on last edited by
          #4

          In addition to what Eugen Podsypalnikov mentioned, may be you can use EM_SETSEL message to highlight the selected text. Other option would be to use a Rich Edit control and EM_FINDTEXTEX message.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups