Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gammasoft71/win32_gui
C++ Win32 gui draft project used to experiment with xtd.
https://github.com/gammasoft71/win32_gui
cpp17 example examples gui win32 win32api
Last synced: 24 days ago
JSON representation
C++ Win32 gui draft project used to experiment with xtd.
- Host: GitHub
- URL: https://github.com/gammasoft71/win32_gui
- Owner: gammasoft71
- License: mit
- Created: 2022-09-05T10:49:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-18T07:38:58.000Z (9 months ago)
- Last Synced: 2024-04-18T08:57:26.049Z (9 months ago)
- Topics: cpp17, example, examples, gui, win32, win32api
- Language: C++
- Homepage: https://gammasoft71.wixsite.com/gammasoft
- Size: 253 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# win32_gui
* C++ Win32 gui draft project used to experiment with [xtd](https://gammasoft71.github.io/xtd/).
* DO NOT USE this project for your developments.
* I put it at the disposal of the community because it can be an inspiration for you and because it could be a good start to start a [Win32](https://docs.microsoft.com/en-us/windows/win32/controls/window-controls) project properly.## This project contains
* A basic [application](https://github.com/gammasoft71/win32_gui/blob/main/win32_gui/src/win32/include/application.h) class that allows to start and stop the Windows event loop
* A [control](https://github.com/gammasoft71/win32_gui/blob/main/win32_gui/src/win32/include/control.h) class which is the basis for all other controls like, [form](https://github.com/gammasoft71/win32_gui/blob/main/win32_gui/src/win32/include/form.h), [button](https://github.com/gammasoft71/win32_gui/blob/main/win32_gui/src/win32/include/button.h), [label](https://github.com/gammasoft71/win32_gui/blob/main/win32_gui/src/win32/include/label.h), ...
* An elegant way to receive the events in all the controls and to process them cleanly in C++.## Remarks
If you want a complete project on which to base your development, please use [xtd](https://gammasoft71.github.io/xtd/).
## Example
```c++
#includeusing namespace win32;
using namespace win32::forms;int wmain(int argc, wchar_t* argv[]) {
form form1;
form1.text(L"Form1");button button1;
button1.location({10, 10});
button1.parent(form1);
button1.text(L"Click me!");button1.click += [](control& sender, const event_args& e) {
MessageBox(form1.handle(), L"Hello, World!", L"", MB_OK);
};application::run(form1);
}
```