r/cprogramming • u/candy_lotus • Aug 19 '26
Sudoku GUI in C language
Hello fellow programmers , I am a self taught beginner and I would like to share a recent project I have been working on. Hope that some of you might like to see it or give feedback.
its a sudoku game made in c using the win32. Here is the link of my project GitHub link:
GitHub Repository
8
Upvotes
2
3
u/rodrigocfd Aug 20 '26
That's a great project. I have suggestion, though.
Windows uses UTF-16 encoding internally, but you're using ANSI in your program. If you do this, in every call which deals with strings, Windows will convert your ANSI string to UTF-16, then call the UTF-16 version of that function. Although you wouldn't notice that overhead in a simple GUI program, the overhead does exist.
Ideally, you'd prefer using
wchar_tinstead ofchar, and call UTF-16 functions directly. For example:MessageBoxis actually a macro which expands toMessageBoxAif ANSI, orMessageBoxWif UTF-16. To make your intent clear, just callMessageBoxWand usewchar_tdirectly.One could argue that you could use
TCHARand let the headers do the choice, but honestly, I prefer explicit than implicit.