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

  • On-demand Event Event Date: September 10, 2014 Modern mobile applications connect systems-of-engagement (mobile apps) with systems-of-record (traditional IT) to deliver new and innovative business value. But the lifecycle for development of mobile apps is also new and different. Emerging trends in mobile development call for faster delivery of incremental features, coupled with feedback from the users of the app "in the wild." This loop of continuous delivery and continuous feedback is how the best mobile …

  • Stories about devastating cyberattacks are plaguing the news. Why? The DNS protocol is easy to exploit. See your network the way hackers do—as an easy target. Learn how you can effectively secure your DNS infrastructure today.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds