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. Auto Complete Combo box

Auto Complete Combo box

Scheduled Pinned Locked Moved C / C++ / MFC
helpgraphics
2 Posts 2 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.
  • M Offline
    M Offline
    misha_grewal
    wrote on last edited by
    #1

    Hello all - I need to implement a full featured auto complete combo box just like what it is in internet explorer. Thanks to a lot of help available on codeproject, I implemented the basic features. But there is one bug which is driving me mad. The details: I have handled CBN_EDITCHANGE message here. and I let it be handled by the parent also using the ON_CONTROL_REFLECT_EX method. The idea is that I store the original combo entries in a vector. When user types in something, on edit change, I get the string, if it matches, I modify the comob entries with the search entries found (As i already have the original combo entries with me) and then call the drop down method to show the search strings. When user closes the dropdown or expands it, I restore the original state of the combo box. similarly when the search string is empty, i restore the state again. Everything works fine, but when the dropdown is closed, and I try to enter a string, the combo box selects the first matched string in the combo (Which I do not want) Whereas if I expand the combo box, the string is not selected. I Guess this is too much. But still I hope someone has the answer. Thanks in advance Be the change you wish to see...

    M 1 Reply Last reply
    0
    • M misha_grewal

      Hello all - I need to implement a full featured auto complete combo box just like what it is in internet explorer. Thanks to a lot of help available on codeproject, I implemented the basic features. But there is one bug which is driving me mad. The details: I have handled CBN_EDITCHANGE message here. and I let it be handled by the parent also using the ON_CONTROL_REFLECT_EX method. The idea is that I store the original combo entries in a vector. When user types in something, on edit change, I get the string, if it matches, I modify the comob entries with the search entries found (As i already have the original combo entries with me) and then call the drop down method to show the search strings. When user closes the dropdown or expands it, I restore the original state of the combo box. similarly when the search string is empty, i restore the state again. Everything works fine, but when the dropdown is closed, and I try to enter a string, the combo box selects the first matched string in the combo (Which I do not want) Whereas if I expand the combo box, the string is not selected. I Guess this is too much. But still I hope someone has the answer. Thanks in advance Be the change you wish to see...

      M Offline
      M Offline
      mark novak
      wrote on last edited by
      #2

      It seems more information is needed in order to answer this, since there is no specific question. You want to know why your code doesn't work but you haven't given us all the information required to answer it. Perhaps showing the code that is relevant will help us catch something.

      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