Coder Social home page Coder Social logo

katahiromz / linenumedit Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 1.0 196 KB

textbox with line numbers in Win32/C++

License: MIT License

CMake 6.76% C++ 93.15% C 0.09%
win32 win32api edit-control textbox text-box line-number line-numbers custom-controls superclassing cxx

linenumedit's Introduction

LineNumEdit by katahiromz

LineNumEdit is a C++/Win32 library that implements "textbox with line numbers".

Screenshot

  • Fully compatible to the Win32 EDIT control.
  • Easily usable in C++.
  • DLL and static supported.
  • Under MIT license.

How to use this library?

As static:

#define LINENUMEDIT_IMPL
#include "LineNumEdit.hpp"
...
LineNumEdit::SuperclassWindow(); // Initialize the library

And create the "LineNumEdit" window by CreateWindow/CreateWindowEx/DialogBox functions with specifying the window class "LineNumEdit". See also LineNumEdit_test.cpp and LineNumEdit_test_res.rc.

You can also use this library even as a DLL:

LoadLibraryA("LineNumEdit");

And create the "LineNumEdit" window.

Messages

LNEM_SETLINENUMFORMAT message

Specifies the format of the line number label. For example, it's TEXT("%d").

  • wParam: Ignored.
  • lParam: The format of LPCTSTR.
  • Return value: zero.

LNEM_SETNUMOFDIGITS message

Sets the number of digits to indicate the width of the line number column.

  • wParam: The number of digits.
  • lParam: Ignored.
  • Return value: zero.

LNEM_SETLINEMARK message

Sets the color of the line number label.

  • wParam: The line number to set a mark.
  • lParam: The COLORREF value or CLR_INVALID. Use RGB macro to get the COLORREF value.
  • Return value: zero.

LNEM_CLEARLINEMARKS message

Clears the color settings of the line number labels.

  • wParam: Ignored.
  • lParam: Ignored.
  • Return value: zero.

LNEM_SETLINEDELTA message

Specifies the line number of the top line.

  • wParam: The line number.
  • lParam: Ignored.
  • Return value: zero.

LNEM_SETCOLUMNWIDTH message

Sets the width of the line number column.

  • wParam: The width of the column, in pixels.
  • lParam: Ignored.
  • Return value: zero.

LNEM_GETCOLUMNWIDTH message

Gets the width of the line number column.

  • wParam: Ignored.
  • lParam: Ignored.
  • Return value: The column width in pixels.

LNEM_GETLINEMARK message

Gets the color setting of a line number.

  • wParam: The line number.
  • lParam: Ignored.
  • Return value: The COLORREF value or CLR_INVALID.

Contact us

Please send e-mail to [email protected] .

linenumedit's People

Contributors

katahiromz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

watch-later

linenumedit's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.