{"id":19364286,"url":"https://github.com/mity/mctrl","last_synced_at":"2025-04-09T16:18:14.699Z","repository":{"id":6704111,"uuid":"7949589","full_name":"mity/mctrl","owner":"mity","description":"C library providing set of additional user interface controls for Windows, intended to be complementary to standard Win32API controls from USER32.DLL and COMCTL32.DLL.","archived":false,"fork":false,"pushed_at":"2021-06-03T18:26:16.000Z","size":16118,"stargazers_count":239,"open_issues_count":15,"forks_count":55,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-09T16:18:03.243Z","etag":null,"topics":["c","controls","dll","library","user-interface","winapi","windows-desktop"],"latest_commit_sha":null,"homepage":"http://mctrl.org","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING.lib.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-01T01:34:14.000Z","updated_at":"2025-03-30T10:14:04.000Z","dependencies_parsed_at":"2022-08-20T08:31:16.686Z","dependency_job_id":null,"html_url":"https://github.com/mity/mctrl","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mity%2Fmctrl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mity%2Fmctrl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mity%2Fmctrl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mity%2Fmctrl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mity","download_url":"https://codeload.github.com/mity/mctrl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065280,"owners_count":21041872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","controls","dll","library","user-interface","winapi","windows-desktop"],"created_at":"2024-11-10T07:36:58.883Z","updated_at":"2025-04-09T16:18:14.673Z","avatar_url":"https://github.com/mity.png","language":"C","readme":"[![Windows Build Status (appveyor.com)](https://img.shields.io/appveyor/ci/mity/mctrl/master.svg?logo=windows\u0026label=windows%20build)](https://ci.appveyor.com/project/mity/mctrl/branch/master)\n[![Coverity Scan Status](https://img.shields.io/coverity/scan/mctrl.svg?label=coverity%20scan)](https://scan.coverity.com/projects/mctrl)\n\n# mCtrl Readme\n\n * Home website: http://mctrl.org\n * Main code repo: http://github.com/mity/mctrl\n\n\n## What is mCtrl\n\nmCtrl is a C library providing set of additional user interface controls for\nMS Windows, intended to be complementary to the standard Win32API controls from\n`USER32.DLL` and `COMCTL32.DLL`.\n\nThe API of the library is designed to be similar to the Win32API. I.e. after\na window class of a control is registered with corresponding initialization\nfunction, the control can be normally created with the Win32API's functions\n`CreateWindow()` or `CreateWindowEx()` and controlled with `SendMessage()`.\n\n\n## Getting mCtrl\n\nYou can always get the latest version and most actual information on project\nhome site:\n\n * http://mctrl.org\n\nThere are usually two packages for each release version available:\n\n * `mCtrl-x.y.z-bin.zip`: pre-built binary package\n * `mCtrl-x.y.z-src.zip`: source package\n\nThe pre-built package contains 32-bit as well as 64-bit binaries of `MCTRL.DLL`\nand examples, and also documentation for application developers. The source\npackage is direct export of source tree from version control system repository.\n\nThe current code (possibly untested and unstable) can also be cloned from git\nrepository hosted on github:\n\n * http://github.com/mity/mctrl\n\n\n## Using mCtrl\n\nThe pre-built release package has the following directory structure:\n\n```\nmCtrl-x.y.z/\n |  AUTHORS.md            # List of authors contributing to the project\n |  CONTRIBUTING.md       # Info how to contribute to the project\n |  COPYING.lib           # GNU Lesser General Public License\n |  README.md             # This file\n |\n +- bin/                  # 32-bit binaries\n |   |  mCtrl.dll         # MCTRL.DLL\n |   |  example-*.exe     # Pre-built examples\n |   |\n |   +- debug-gcc/\n |   |      mCtrl.dll     # Debug build of MCTRL.DLL (built with gcc)\n |   |\n |   +- debug-msvc/\n |          mCtrl.dll     # Debug build of MCTRL.DLL (built with Visual Studio)\n |          mCtrl.pdb     # Visual Studio debug info\n |\n +- bin64/                # 64-bit binaries\n |   |  mCtrl.dll         # MCTRL.DLL\n |   |  example-*.exe     # Pre-built examples\n |   |\n |   +- debug-gcc/\n |   |      mCtrl.dll     # Debug build of MCTRL.DLL (built with gcc)\n |   |\n |   +- debug-msvc/\n |          mCtrl.dll     # Debug build of MCTRL.DLL (built with Visual Studio)\n |          mCtrl.pdb     # Visual Studio debug info\n |\n +- doc/                  # Reference manual\n |      *.html\n |\n +- examples/             # Examples\n |      CMakeLists.txt    # CMake recipe for building the examples\n |      *.c; *.h; *.rc    # Source files of the examples\n |\n +- include/\n |   |  mctrl.h           # All-in-one public header (includes all mCtrl/*.h)\n |   |\n |   +- mCtrl/\n |          *.h           # mCtrl public headers\n |\n +- lib/                  # 32-bit import libraries\n |      libmCtrl.dll.a    # Import library for gcc\n |      mCtrl.lib         # Import library for Visual Studio\n |\n +- lib64/                # 64-bit import libraries\n        libmCtrl.dll.a    # Import library for gcc\n        mCtrl.lib         # Import library for Visual Studio\n```\n\nUsing mCtrl is as easy as using any other DLL, just tell your compiler and\nlinker where it can find mCtrl headers and libraries.\n\nNote you should instruct your C/C++ compiler to search for header files in\nthe `include` directory and use the directory `mCtrl` as part of preprocessor\n`#include` directives, e.g.:\n\n```C\n#include \u003cmCtrl/dialog.h\u003e\n#include \u003cmCtrl/treelist.h\u003e\n```\n\n\n## Building mCtrl from Sources\n\nDisclaimer: If you want to just use `MCTRL.DLL` you should probably stick with\nthe pre-built package.\n\nTo build mCtrl yourself from the source package or cloned git repository, first\nof all you need to use [CMake](http://www.cmake.org) 3.1 (or newer) to generate\nproject files, Makefile or whatever the development tool-chain of your choice\nexpects.\n\n### Build with Mingw-w64\n\nIt's recommended to use out-of-source-tree builds, so create e.g. a directory\n`build` in the main mCtrl directory. (If you build in directory located\nelsewhere, replace the `..` in the following instructions with the path\npointing to the root mCtrl directory.)\n\nTo build with MSYS + [mingw-w64](http://mingw-w64.org) + Make:\n\n```sh\n$ mkdir build\n$ cd build\n$ cmake -G \"MSYS Makefiles\" ..\n$ make\n```\n\nTo build with MSYS + mingw-w64 + [Ninja](http://martine.github.io/ninja):\n\n```sh\n$ mkdir build\n$ cd build\n$ cmake -G \"Ninja\" ..\n$ ninja\n```\n\nTo build within [MSYS2](http://msys2.github.io), make sure you have these\nMSYS2 packages installed:\n\n * `make`\n * `mingw-w64-i686-gcc`, `mingw-w64-i686-cmake` (for 32-bit build)\n * `mingw-w64-x86_64-gcc`, `mingw-w64-x86_64-cmake` (for 64-bit build)\n\nThen start MSYS2 shell with `mingw32_shell.bat` or `mingw64_shell.bat`\nrespectively and follow the same instructions as above for MSYS + \nmingw-w64 + Make.\n\nNote you may need to specify path to `gcc` if you want to use a different gcc\nversion than the one in your `$PATH`, e.g. if you have multiple mingw-w64\nvariants installed, one targeting 32-bit and one 64-bit build.\n\nYou may do so by setting the variable `CC` prior using CMake. CMake is smart\nenough to derive paths to the other tools like a linker or a resource compiler\nautomatically.\n\n```sh\nexport CC=/path/to/the/desired/gcc\n```\n\n### Build with Microsoft Visual Studio 2017 (or newer)\n\nVisual Studio 2017 and newer supports CMake build system directly:\n\n 1. Start Visual Studio 2017.\n 2. In menu File, choose submenu Open and Folder.\n 3. In the open dialog, navigate to mCtrl main folder and open it.\n 4. In menu CMake, choose Build all.\n\n### Build with Older Version of Microsoft Visual Studio\n\nTo build with older Microsoft Visual Studio (versions 2013 and 2015 are known\nto work), you have to generate project files manually:\n\n```sh\n$ mkdir build\n$ cd build\n$ cmake -G \"Visual Studio 12 2013\" ..           # MSVC 2013, 32-bit build\n$ cmake -G \"Visual Studio 12 2013 Win64\" ..     # MSVC 2013, 64-bit build\n$ cmake -G \"Visual Studio 14 2015\" ..           # MSVC 2015, 32-bit build\n$ cmake -G \"Visual Studio 14 2015 Win64\" ..     # MSVC 2015, 64-bit build\n```\n\nThen open the generated solution file `build/mCtrl.sln` in Visual Studio and\nbuild the target `ALL_BUILD`.\n\nUnfortunately, for older MSVC versions, CMake does not support generating\nprojects targeting multiple architectures. Therefore, to build both 32 and\n64-bit binaries, you have to generate project files or Makefiles twice and\nbuild them separately, in dedicated directories.\n\n### Other Toolchains\n\nOther CMake generators may or may not work. If they do not, then one or more\n`CMakeLists.txt` files within mCtrl directory hierarchy may need some tuning.\n\nUse\n\n```sh\n$ cmake --help\n```\n\nand refer to CMake documentation to learn more about CMake, its options and\ncapabilities.\n\n### After the Build\n\nAfter the building, consider running a mCtrl test-suite to verify correctness\nof your build. The test suite, as well as some examples demonstrating mCtrl,\nare built as part of the mCtrl build process.\n\n\n## License\n\nmCtrl itself is covered by the GNU Lesser General Public License 2.1 or\n(if you choose so) any later version. Refer to the file `COPYING.lib.md` for\nmore information about licensing terms.\n\nSome source files and libraries incorporated into mCtrl may have different\n(but compatible) licensing terms and some may be put into the public domain:\n\n * Examples (`examples/*`): Public domain\n * Unit tests (`tests/*.c`): Public domain\n * 3rd party code:\n   * Acutest (`lib/acutest/`): MIT license\n   * c-reusables (`lib/c-reusables/`): MIT license\n   * HSLuv-C (`lib/hsluv-c/`): MIT license\n\n\n## Reporting Bugs\n\nIf you encounter any bug, please be so kind and report it. Unheard bugs cannot\nget fixed. You can submit bug reports here:\n\n * http://github.com/mity/mctrl/issues\n\nPlease provide the following information with the bug report:\n\n * mCtrl version you are using.\n * Whether you use 32-bit or 64-bit build of mCtrl.\n * OS version where you reproduce the issue.\n * As explicit description of the issue as possible, i.e. what behavior\n   you expect and what behavior you see.\n   (Reports of the kind \"it does not work.\" do not help).\n * If relevant, consider attaching a screenshot.\n * If relevant, some code reproducing the issue can be vital. Ideally in some\n   of these forms:\n    - a complete source code which can compile as a standalone C or C++ program;\n    - a patch or pull request to be applied to one of the examples in mCtrl\n      source tree;\n    - or (if it is not overly long) as a C function (or few functions) which\n      can replace whole function (or few functions) in one of those examples.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmity%2Fmctrl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmity%2Fmctrl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmity%2Fmctrl/lists"}