Skip to content

Commit 4e2e09a

Browse files
committed
docs: Add snapshot
1 parent 4796367 commit 4e2e09a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,24 @@
1818
1. Call the functions as instructed by the [Win32 API documentation](https://learn.microsoft.com/en-us/windows/win32/api/). All functions, constants and types are named accordingly.
1919
* Constants like `WM_DESTROY` are exported as `const enum`s, where the prefix is the name of the enum. Eg, `WM_DESTROY` and `WM_KEYDOWN` are exported as `WM.DESTROY` and `WM_KEYDOWN` (if you use TypeScript, you may want to set `preserveConstEnmums = false` in `tsconfig.json`).
2020

21+
A very basic example:
22+
23+
````js
24+
import { MessageBox, MB } from 'libwin32'
25+
26+
const result = MessageBox(
27+
null,
28+
"Hello, world!",
29+
"libwin32",
30+
MB.ICONQUESTION | MB.HELP | MB.YESNO
31+
)
32+
console.dir(result)
33+
````
34+
35+
Result:
36+
37+
![alt text](docs/snapshot.png)
38+
2139
#### > Build the lib
2240

2341
````shell

docs/snapshot.png

12.9 KB
Loading

0 commit comments

Comments
 (0)