Hi.
I was inspired by Paul N's question about restructuring some Windows
code "to make it look neater", and started coding up some basics.
https://github.com/alf-p-steinbach/winapi-gui-wait/tree/master/source
Reusable stuff is kept to the minimum /required/ to do this properly,
and collected in a little header only library "microlib" (so that's what
it is, the reusable stuff of this app). Much of the standard C++ stuff
is just hoisted from my private code base. But some is new for me and
will make it back into that code base.
The app (just a window with a button that presents a message box) has
modern look and feel, is UTF-8 based, and I work around a Windows bug
where the area outside a modern rounded button presents the parent
window's defined background color (instead of the actual background),
and ditto work-around for a message box being placed in the middle of a
developer's wide screen regardless of window placement far away.
Re C++ aspects I would like some help with the first mentioned
work-around. It's some background erasure functions near the top of the
`main.cpp` file. This works for a solid color as background, but the
design probably sucks for a repeated image as background, because it has
to be offset for painting the button's background. I can't quite see it.
Re CMake, I've never made a CMakeLists.txt file before. So it may be
weird, it may be wrong, it may perhaps only work on /my/ system. Helpful
comments would be great.
I didn't so far get to Paul N's question about a wait action. Because I
got bogged down in Windows API intricacies and now I feel tired of
coding and will read a book and just sit in the sun. Plus I'll read
answers and comments here, if any, before picking this up again. :)
Anyway, enjoy.
- Alf