Auto-Fill Edit Control

Environment: Windows 98, Visual C++ 5.0

A fine class for lazy operators :)

This is an enhanced edit class: it allows to reduce the input time recording the words previously inserted and showing them when some letters are typed.

This class is generated starting from CEdit, and can store up to 128 (but it's possible to change this limit) words; it's use is really easy: all you have to do are the following steps:

  1. design your own CDialog or CFormView (or derived class) inserting the standard editbox;
  2. include AFEdit.h & AFEdit.cpp in your project;
  3. in the CXYZ.h file generated for the dialog (or view) include AFEdit.h and replace all CEdit with CAFEdit;
  4. in the OnInitDialog (or OnInitialUpdate) add the strings you want to be inserted in the words list for each editbox;

Every time you insert a new word in a specific editbox, the relative list will growth if necessary (no duplication). Of cource, if the class is deleted all data are lost. I tested it in a multiline editbox too, and it works fine.

There is only one known problem: in a multiline editbox the pair CTRL-TAB insters a tab int the text, the source I wrote isn't still able to intercept that couple :(
In debug mode a doubleclick on an editbox shows a dialog with the entire list.

Downloads

Download demo project and source code - 13 Kb


Comments

  • This is great, thanks

    Posted by Legacy on 02/23/2003 12:00am

    Originally posted by: Marco Walle

    I learn too much from this type of program, is simple, elegant, and powerfull. I hope someday write programs like you... Thanks

    Reply
  • ExEditors Library

    Posted by Legacy on 03/19/2002 12:00am

    Originally posted by: Mike Philips

    A complete collection of editors in a single file:
    
    

    http://www.exontrol.com/sg.jsp?content=products/exeditors

    Regards,
    Mike

    Reply
  • Excellent piece of work

    Posted by Legacy on 01/25/2001 12:00am

    Originally posted by: Bob Moore

    Thanks ! You saved me a lot of time with this one.

    Bob

    Reply
  • Add registry support

    Posted by Legacy on 01/26/2000 12:00am

    Originally posted by: Igor Proskuriakov

    Hi,
    It would be nice to add registry support, which will allow this control to save all this words in registry on destroy and to read from it upon creation

    Regards,
    Igor

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • As everyone scrambles to protect customers and consumers from the Heartbleed virus, there will be a variety of mitigating solutions offered up to address this pesky bug. There are a variety of points within the data path where solutions could be put into place to mitigate this (and similar) vulnerabilities and customers must choose the most strategic point in the network at which to deploy their selected mitigation. Read this white paper to learn the ins and outs of mitigating the risk of Heartbleed and the …

  • Packaged application development teams frequently operate with limited testing environments due to time and labor constraints. By virtualizing the entire application stack, packaged application development teams can deliver business results faster, at higher quality, and with lower risk.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds