{"id":16692522,"url":"https://github.com/ckormanyos/win_text_simple","last_synced_at":"2025-03-13T22:41:19.540Z","repository":{"id":193818559,"uuid":"689553782","full_name":"ckormanyos/win_text_simple","owner":"ckormanyos","description":"win_text_simple makes a simple Win32-API window with dynamic text","archived":false,"fork":false,"pushed_at":"2023-09-10T11:52:18.000Z","size":46,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-20T18:11:29.523Z","etag":null,"topics":["cpp","visual-studio","win32api"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ckormanyos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-10T07:12:51.000Z","updated_at":"2024-08-19T19:06:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9e7daeb-006e-44cd-942a-7132bc5ed99f","html_url":"https://github.com/ckormanyos/win_text_simple","commit_stats":null,"previous_names":["ckormanyos/win_text_simple"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckormanyos%2Fwin_text_simple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckormanyos%2Fwin_text_simple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckormanyos%2Fwin_text_simple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckormanyos%2Fwin_text_simple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ckormanyos","download_url":"https://codeload.github.com/ckormanyos/win_text_simple/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243495484,"owners_count":20299921,"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":["cpp","visual-studio","win32api"],"created_at":"2024-10-12T16:27:24.833Z","updated_at":"2025-03-13T22:41:19.520Z","avatar_url":"https://github.com/ckormanyos.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"win_text_simple\n==================\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/ckormanyos/win_text_simple/actions\"\u003e\n        \u003cimg src=\"https://github.com/ckormanyos/win_text_simple/actions/workflows/win_text_simple.yml/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/ckormanyos/win_text_simple/blob/main/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/license-BSL%201.0-blue.svg\" alt=\"Boost Software License 1.0\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/ckormanyos/win_text_simple\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/languages/code-size/ckormanyos/win_text_simple\" alt=\"GitHub code size in bytes\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://godbolt.org/z/nWcc6KbKx\" alt=\"godbolt\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/try%20it%20on-godbolt-green\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nwin_text_simple makes a simple Win32-API window with dynamic\n_Window_ _Text_.\n\n![](./images/win_text_simple.jpg)\n\n## The Win32-API and ckormanyos/win_text_simple\n\nIn chapter 2 of [1], the author describes and provides a code listing\nfor a simple text-based window. The example uses what was then known as the\nWindows 95 API, which would later become the Win32-API.\n\nMicrosoft(R) Visual Studio(R) products (even Community-Editions)\nsupport the traditional Win32-API, also for _x64_ builds.\nThis API is very conventient and can still be used today\nto program Windows(R)-based applications.\n\nckormanyos/win_text_simple generally follows the code supplied in\nFig. 2-1 _The_ _HELLOWWIN_ _Program_ of [1]. It does, however,\nadd additional timer and threading facilities to create a dynamic,\ntext-based Win32-API program.\n\nThe main assignment of the program is a non-trivial functionality.\nA self-written `WM_TIMER` event/handler is used to query and\ndynamically print the value of `std::chrono`'s\nhigh-performance clock in the text field of the window.\nA decimal 64-bit representation (in nanoseconds)\nof the running tick is used.\n\n## Implementation\n\nThe application is written in header-only, modern C++ and is compatible\nwith C++14, 17, 20, 23 and beyond.\n\nThe standard Windows(R) message pump technology is used.\nAn additional `WM_TIMER` message and handler have been added\nfor handling the interaction with `std::chrono`.\n\nThe window features its own specialized icon which has been created\nwith the standard icon editor and loaded at application start.\n\n![](./images/icon.jpg)\n\nAn object of type `std::thread` (in modern C++) is used\nfor synchronization and properly shutting down and de-registering\nthe window at application close.\n\n## Continuous Integration\n\nContinuous integration runs in GitHub Actions using the `windows-latest`\nimage. The CI job builds the _x64-Release_ version\nof the application and checks for the existence of the executable.\n\n## References\n\n[1] C. Petzold, _Programming_ _Windows(R)_ _95_,\nMicrosoft Press 1996.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckormanyos%2Fwin_text_simple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fckormanyos%2Fwin_text_simple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckormanyos%2Fwin_text_simple/lists"}