From 0fdcce5f834fe18113c861560264f5a04f7edd39 Mon Sep 17 00:00:00 2001 From: Amaroq Starwind Date: Sat, 18 May 2024 04:21:29 -0500 Subject: [PATCH 1/3] Create README.md Disclaimer This README was produced using ChatGPT and may contain errors in its content and/or formatting. Please verify the information and refer to the source code for the most accurate details. --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..05f58c8 --- /dev/null +++ b/README.md @@ -0,0 +1,69 @@ +win32_smartdlg + +win32_smartdlg is a library for creating dynamic, pixel-less layouts in Win32 applications. It provides an abstraction layer over the traditional Win32 window API, allowing for more flexible and responsive UI designs. + +Features + + • Dynamic Layouts: Automatically resizes and repositions controls. + • Easy Integration: Simple API for integrating into existing Win32 projects. + • No Pixel Positioning: Define layouts without worrying about pixel coordinates. + +Getting Started + +Prerequisites + + • Windows: This library is designed for Windows applications. + • C++ Compiler: Ensure you have a C++ compiler that supports the Win32 API. + +Installation + + 1. Clone the Repository: + +git clone https://github.com/thpatch/win32_smartdlg + + + 2. Include in Project: Add the source files to your C++ project. + +Usage + + 1. Include Header: + +#include "SmartDlg.h" + + + 2. Initialize Layout Manager: + +void InitDialog(HWND hDlg) { + SmartDlg dlg(hDlg); + dlg.addControl(IDC_BUTTON1, SMARTDLG_ANCHOR_LEFT | SMARTDLG_ANCHOR_TOP); + dlg.addControl(IDC_EDIT1, SMARTDLG_ANCHOR_LEFT | SMARTDLG_ANCHOR_RIGHT | SMARTDLG_ANCHOR_TOP); + // Add more controls as needed +} + + + 3. Compile and Run: Build and run your application. The layout manager will handle dynamic resizing. + +Example + +Here’s a basic example of setting up a dialog with dynamic layouts: + +#include "SmartDlg.h" + +void InitDialog(HWND hDlg) { + SmartDlg dlg(hDlg); + dlg.addControl(IDC_BUTTON1, SMARTDLG_ANCHOR_LEFT | SMARTDLG_ANCHOR_TOP); + dlg.addControl(IDC_EDIT1, SMARTDLG_ANCHOR_LEFT | SMARTDLG_ANCHOR_RIGHT | SMARTDLG_ANCHOR_TOP); + // More control initializations +} + +Contributing + +Contributions are welcome! Please fork the repository and submit pull requests. + +Disclaimer + +This README was produced using ChatGPT and may contain errors, both in its content and its formatting. Please verify the information and refer to the source code for the most accurate details. + +License + +This project is licensed under the MIT License. From 7e3e3d920882ce67c93186cfe5bddb07ed61da08 Mon Sep 17 00:00:00 2001 From: Max <108522586+MaxyTheFoxy@users.noreply.github.com> Date: Sat, 18 May 2024 16:31:46 +0700 Subject: [PATCH 2/3] Update README.md --- README.md | 77 +++++++++++++++++++++---------------------------------- 1 file changed, 29 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 05f58c8..8896c7e 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,36 @@ -win32_smartdlg - -win32_smartdlg is a library for creating dynamic, pixel-less layouts in Win32 applications. It provides an abstraction layer over the traditional Win32 window API, allowing for more flexible and responsive UI designs. - -Features - - • Dynamic Layouts: Automatically resizes and repositions controls. - • Easy Integration: Simple API for integrating into existing Win32 projects. - • No Pixel Positioning: Define layouts without worrying about pixel coordinates. - -Getting Started - -Prerequisites - - • Windows: This library is designed for Windows applications. - • C++ Compiler: Ensure you have a C++ compiler that supports the Win32 API. - -Installation - - 1. Clone the Repository: - -git clone https://github.com/thpatch/win32_smartdlg - - - 2. Include in Project: Add the source files to your C++ project. - -Usage - - 1. Include Header: - -#include "SmartDlg.h" - - - 2. Initialize Layout Manager: - +# win32_smartdlg +Win32_smartdlg is a library for creating dynamic, pixel-less layouts in Win32 applications. It provides an abstraction layer over the traditional Win32 window API, allowing for more flexible and responsive UI designs. + +## Features +- Dynamic Layouts: Automatically resizes and repositions controls. +- Easy Integration: Simple API for integrating into existing Win32 projects. +- No Pixel Positioning: Define layouts without worrying about pixel coordinates. + +## Getting Started +### Prerequisites +- Windows: This library is designed for Windows applications. +- C++ Compiler: Ensure you have a C++ compiler that supports the Win32 API. + +### Installation +1. Clone the Repository: `git clone https://github.com/thpatch/win32_smartdlg` +2. Include in Project: Add the source files to your C++ project. + +### Usage +1. Include Header: `#include "SmartDlg.h"` +2. Initialize Layout Manager: +``` void InitDialog(HWND hDlg) { SmartDlg dlg(hDlg); dlg.addControl(IDC_BUTTON1, SMARTDLG_ANCHOR_LEFT | SMARTDLG_ANCHOR_TOP); dlg.addControl(IDC_EDIT1, SMARTDLG_ANCHOR_LEFT | SMARTDLG_ANCHOR_RIGHT | SMARTDLG_ANCHOR_TOP); // Add more controls as needed } +``` +3. Compile and Run: Build and run your application. The layout manager will handle dynamic resizing. - - 3. Compile and Run: Build and run your application. The layout manager will handle dynamic resizing. - -Example - +## Example Here’s a basic example of setting up a dialog with dynamic layouts: - +``` #include "SmartDlg.h" void InitDialog(HWND hDlg) { @@ -55,15 +39,12 @@ void InitDialog(HWND hDlg) { dlg.addControl(IDC_EDIT1, SMARTDLG_ANCHOR_LEFT | SMARTDLG_ANCHOR_RIGHT | SMARTDLG_ANCHOR_TOP); // More control initializations } - -Contributing - +``` +## Contributing Contributions are welcome! Please fork the repository and submit pull requests. -Disclaimer - +## Disclaimer This README was produced using ChatGPT and may contain errors, both in its content and its formatting. Please verify the information and refer to the source code for the most accurate details. -License - +## License This project is licensed under the MIT License. From 58b8483fc31eeaf6bfa964b04536855ae293521f Mon Sep 17 00:00:00 2001 From: Amaroq Starwind Date: Sat, 18 May 2024 04:48:41 -0500 Subject: [PATCH 3/3] Update README.md Added Dependency information. --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8896c7e..0635d8c 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,15 @@ Win32_smartdlg is a library for creating dynamic, pixel-less layouts in Win32 ap ## Getting Started ### Prerequisites -- Windows: This library is designed for Windows applications. +- Windows XP or newer: This library is designed for Windows applications. +- ReactOS / Wine: For the purposes of this library, ReactOS and Wine are acceptable substitutes. - C++ Compiler: Ensure you have a C++ compiler that supports the Win32 API. +### Dependencies +By default, this project depends on the win32_utf8 library. You can find it here: https://github.com/thpatch/win32_utf8 + +To include this dependency in your projects, replace `#include ` with `#include ` in your source files. If you do not wish to include Unicode support, simply reverse this change. + ### Installation 1. Clone the Repository: `git clone https://github.com/thpatch/win32_smartdlg` 2. Include in Project: Add the source files to your C++ project.