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

  • With JRebel, developers get to see their code changes immediately, fine-tune their code with incremental changes, debug, explore and deploy their code with ease (both locally and remotely), and ultimately spend more time coding instead of waiting for the dreaded application redeploy to finish. Every time a developer tests a code change it takes minutes to build and deploy the application. JRebel keeps the app server running at all times, so testing is instantaneous and interactive.

  • The rapid evolution of enterprise storage technologies, combined with external forces, like the explosion of big data, can cause Linux® and server administrators to play catch-up when it comes to storage. Running a bunch of monolithic storage devices and proprietary, disconnected technologies forces administrators to spend valuable time creating and managing complex solutions. To reduce complexity and enable rapid deployment of new technologies and applications, server administrators need a single open …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds