Click here to Skip to main content
15,884,177 members
Articles / Desktop Programming / WTL
Article

kPad - A lightweight WTL based text editor

Rate me:
Please Sign up or sign in to vote.
4.98/5 (20 votes)
5 Aug 2000 367.1K   10.3K   84   38
An example of using the WTL library and RichEdit control
  • Download source files - 79 Kb
  • Download demo project - 52 Kb
  • Sample Image - kPad.gif

    Introduction

    kPad is a lightweight text editor that works with RTF and TXT file formats.

    It's an example of using the WTL library and RichEdit control, and is based on the MTPad sample from the Microsoft SDK (12/01/99).

    Features

    • Sheets control
    • Find and Replace custom dialogs
    • Small size (104 Kb)

    Implementation

    With the help of the ATL\WTL AppWizard I created a "Multiple Threads SDI" project with a generic view window. The class SheetsCtrl is a view window for the Main Frame and a container for kSheetView child windows. kSheetView is a superclass of the RichEdit control.

    The small size of 105 Kb is achieved by removing the dependancy on the CRT library (_ATL_MIN_CRT) and use the project options /OPT:REF, /OPT:ICF, /OPT:NOWIN98.

    Environment

    This application was created with VC 6.0. SP3, WTL and the January MS SDK. It has been tested only on W2k.

    Acknowledgments

    WTL Sites References

    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    Written By
    Web Developer
    Russian Federation Russian Federation
    I am freelance programmer. About 3 years of experience in C++ and I would rather use ATL, STL, WTL but not MFC Smile | :) . Main backgrounds are Win32 API, COM and Networking. Now I am interested about AI (Neural Network, Fuzzy Logic and GA). Currently based in Vladivostok, Russia.

    Comments and Discussions

     
    GeneralRe: I get 31 errors. Pin
    Nnamdi Onyeyiri28-Aug-01 8:43
    Nnamdi Onyeyiri28-Aug-01 8:43 
    GeneralRe: I get 31 errors. they keep coming Pin
    Nnamdi Onyeyiri29-Aug-01 10:55
    Nnamdi Onyeyiri29-Aug-01 10:55 
    GeneralRe: I get 31 errors. they keep coming Pin
    Konstantin Boukreev29-Aug-01 14:24
    Konstantin Boukreev29-Aug-01 14:24 
    GeneralRe: I get 31 errors. they keep coming Pin
    Nnamdi Onyeyiri29-Aug-01 21:58
    Nnamdi Onyeyiri29-Aug-01 21:58 
    GeneralRe: I get 31 errors. they keep coming Pin
    Konstantin Boukreev29-Aug-01 22:15
    Konstantin Boukreev29-Aug-01 22:15 
    GeneralRe: I get 31 errors. they keep coming Pin
    Nnamdi Onyeyiri29-Aug-01 23:33
    Nnamdi Onyeyiri29-Aug-01 23:33 
    GeneralRe: I get 31 errors. they keep coming Pin
    Martin Walker7-Mar-04 21:49
    Martin Walker7-Mar-04 21:49 
    GeneralRe: I get 31 errors. they keep coming Pin
    spyderdan24-Aug-04 14:00
    spyderdan24-Aug-04 14:00 
    Well thats one way to solve it but if you need the older version for some reason that could be a problem. All you need to do with Visual Studio 6 is Open up from the file menu tools/Options > click the directories tab > includ files >

    Add Drive:\PROGRAM FILES\MICROSOFT SDK\INCLUDE

    Then move this to the top of your list of includes.

    It's similar for VS .Net 2003 also. Open the file menu from tools/Options > Projects folder > VC++ Directories > Include files >

    Add Drive:\PROGRAM FILES\MICROSOFT SDK\INCLUDE

    Then move this to the top of your list of includes. If memory serves 2003 and 2002 were the same to set up.



    L8R,
    Spyder
    GeneralA God! Pin
    19-Aug-01 17:51
    suss19-Aug-01 17:51 
    Generalhyperlinks Pin
    19-Aug-01 11:51
    suss19-Aug-01 11:51 
    QuestionWhere can I download WTL? Pin
    9-Dec-00 1:57
    suss9-Dec-00 1:57 
    AnswerRe: Where can I download WTL? Pin
    9-Dec-00 7:19
    suss9-Dec-00 7:19 
    GeneralRe: Where can I download WTL? Pin
    10-Dec-00 0:38
    suss10-Dec-00 0:38 
    GeneralRe: Where can I download WTL? Pin
    yogz19-Nov-01 12:20
    yogz19-Nov-01 12:20 
    GeneralRe: Where can I download WTL? Pin
    Kant18-Mar-03 18:00
    Kant18-Mar-03 18:00 
    GeneralWin2k Pin
    Boris Vidolov18-Aug-00 2:49
    Boris Vidolov18-Aug-00 2:49 
    GeneralMissing DLL Pin
    Boris Vidolov18-Aug-00 2:42
    Boris Vidolov18-Aug-00 2:42 
    GeneralRe: Missing DLL Pin
    Ansgar7-Sep-00 4:37
    Ansgar7-Sep-00 4:37 
    GeneralVery good WTL sample! Pin
    Ideal7-Aug-00 16:00
    Ideal7-Aug-00 16:00 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.