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

  • IBM Worklight is a mobile application development platform that lets you extend your business to mobile devices. It is designed to provide an open, comprehensive platform to build, run and manage HTML5, hybrid and native mobile apps.

  • Best-in-Class organizations execute on a strategy that supports the multi-channel nature of customer requests. These leading organizations do not just open up their service infrastructures to accommodate new channels, but also empower their teams to deliver an effective and consistent experience regardless of the channel selected by the customer. This document will highlight the key business capabilities that support a Best-in-Class customer engagement strategy.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds