Skip to content

Extend Win32 common dialog bindings - #7584

Merged
Kelimion merged 3 commits into
odin-lang:masterfrom
bplu4t2f:comdlg32
Sep 29, 2026
Merged

Kelimion merged 3 commits into
odin-lang:masterfrom
bplu4t2f:comdlg32

Conversation

@bplu4t2f

@bplu4t2f bplu4t2f commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

core:sys/windows already contained bindings for the open/save file dialogs.

This PR adds the rest of the common dialogs implemented in comdlg32.dll.

See: https://learn.microsoft.com/en-us/windows/win32/dlgbox/using-common-dialog-boxes

It also fixes some incorrect declarations in OPENFILENAMEW.

This comes with new examples: odin-lang/examples#183

Note: The person who originally did the bindings for the file dialog included a convenience wrapper function, but in 2022 Bill removed all core:strings dependencies from core:sys/windows, and that code has been defunct ever since. I was advised to remove it for the time being. A roughly equivalent functional replacement is provided in the new example (see above).

Important: Due to the partially incorrect previous declaration of OPENFILENAMEW, this can break user code, notably the assignment of the file name buffer. Jeroen and I decided that it is preferable to correct the problem, rather than preserving a bug for backward compatibility.

@bplu4t2f
bplu4t2f marked this pull request as ready for review September 18, 2026 08:43
@Kelimion
Kelimion merged commit 1bdd184 into odin-lang:master Sep 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants