Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

If you analyse anything, you destroy it. -- Arthur Miller


devel / comp.lang.c++ / Re: Some std C++ and Windows API level and CMake code to discuss (just presents a Windows window)

SubjectAuthor
* Some std C++ and Windows API level and CMake code to discuss (justAlf P. Steinbach
`- Re: Some std C++ and Windows API level and CMake code to discuss (justRichard

1
Some std C++ and Windows API level and CMake code to discuss (just presents a Windows window)

<u7nj0c$2lbvj$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=561&group=comp.lang.c%2B%2B#561

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: alf.p.st...@gmail.com (Alf P. Steinbach)
Newsgroups: comp.lang.c++
Subject: Some std C++ and Windows API level and CMake code to discuss (just
presents a Windows window)
Date: Fri, 30 Jun 2023 23:55:23 +0200
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <u7nj0c$2lbvj$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 30 Jun 2023 21:55:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="983a23a83960496b5bffc8acef04259e";
logging-data="2797555"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Xape9ibdlDA5Kv9xnT3Ny"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:PmMjeKfZ4TXZL0b2ptsq33LyGZo=
Content-Language: en-US
 by: Alf P. Steinbach - Fri, 30 Jun 2023 21:55 UTC

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

Re: Some std C++ and Windows API level and CMake code to discuss (just presents a Windows window)

<u82b64$1reg1$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=634&group=comp.lang.c%2B%2B#634

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: legalize...@mail.xmission.com (Richard)
Newsgroups: comp.lang.c++
Subject: Re: Some std C++ and Windows API level and CMake code to discuss (just
presents a Windows window)
Date: Tue, 4 Jul 2023 23:49:25 -0000 (UTC)
Organization: multi-cellular, biological
Sender: legalize+jeeves@mail.xmission.com
Message-ID: <u82b64$1reg1$1@news.xmission.com>
References: <u7nj0c$2lbvj$1@dont-email.me>
Reply-To: (Richard) legalize+jeeves@mail.xmission.com
Injection-Date: Tue, 4 Jul 2023 23:49:25 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:2607:fa18:0:beef::4";
logging-data="1948161"; mail-complaints-to="abuse@xmission.com"
X-Reply-Etiquette: No copy by email, please
Mail-Copies-To: never
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: legalize@shell.xmission.com (Richard)
 by: Richard - Tue, 4 Jul 2023 23:49 UTC

[Please do not mail me a copy of your followup]

"Alf P. Steinbach" <alf.p.steinbach@gmail.com> spake the secret code
<u7nj0c$2lbvj$1@dont-email.me> thusly:

>I was inspired by Paul N's question about restructuring some Windows
>code "to make it look neater", and started coding up some basics.

Meh. Just use WinLamb.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>


devel / comp.lang.c++ / Re: Some std C++ and Windows API level and CMake code to discuss (just presents a Windows window)

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor