On Friday, 26 October 2018 at 15:10:14 UTC, Mark Moorhen wrote:
It does compile, but does not run as expected. Any clues?
You imported, but never actually called Runtime.initalize().
Just stick that at the top, first thing you do inside WinMain,
and it will work. (or use main instead of WinMa
On Friday, 26 October 2018 at 13:59:17 UTC, Adam D. Ruppe wrote:
On Friday, 26 October 2018 at 12:36:42 UTC, Mark Moorhen wrote:
Can anyone help me out with this?
Yeah, let me make a few general points here:
Welcome to the wonderful world of wide strings and D Windows
programming! :)
On Friday, 26 October 2018 at 12:36:42 UTC, Mark Moorhen wrote:
Can anyone help me out with this?
Yeah, let me make a few general points here:
* The win32.xxx packages shouldn't be necessary any longer,
because they have been merged into the druntime core since those
tutorials were written,
On Friday, 26 October 2018 at 13:20:17 UTC, Adam D. Ruppe wrote:
If that doesn't compile without casts, you don't want it to
compile - casting is often a mistake; the compiler is trying to
tell you something.
Now you've mentioned, I also tried:
{
const(char)* content = "Some random con
On Friday, 26 October 2018 at 13:13:07 UTC, Mark Moorhen wrote:
But how would you do this without casts?
If that doesn't compile without casts, you don't want it to
compile - casting is often a mistake; the compiler is trying to
tell you something.
Let me guess, it is saying something like
On Friday, 26 October 2018 at 13:04:21 UTC, Adam D. Ruppe wrote:
On Friday, 26 October 2018 at 12:56:21 UTC, rikki cattermole
wrote:
MessageBoxA(null, cast(const(char)*)content.ptr,
cast(const(char)*)"Window title".ptr, 0);
Get rid of those casts, they are unnecessary.
I got to this:
On Friday, 26 October 2018 at 12:56:21 UTC, rikki cattermole
wrote:
On 27/10/2018 1:46 AM, Mark Moorhen wrote:
On Friday, 26 October 2018 at 12:39:13 UTC, rikki cattermole
wrote:
On 27/10/2018 1:36 AM, Mark Moorhen wrote:
[...]
alias string = immutable(char)[];
A slice (string in this case)
On Friday, 26 October 2018 at 12:56:21 UTC, rikki cattermole
wrote:
MessageBoxA(null, cast(const(char)*)content.ptr,
cast(const(char)*)"Window title".ptr, 0);
Get rid of those casts, they are unnecessary.
On 27/10/2018 1:46 AM, Mark Moorhen wrote:
On Friday, 26 October 2018 at 12:39:13 UTC, rikki cattermole wrote:
On 27/10/2018 1:36 AM, Mark Moorhen wrote:
[...]
alias string = immutable(char)[];
A slice (string in this case) is a length + pointer pair. You need to
add .ptr on content with a
On Friday, 26 October 2018 at 12:39:13 UTC, rikki cattermole
wrote:
On 27/10/2018 1:36 AM, Mark Moorhen wrote:
[...]
alias string = immutable(char)[];
A slice (string in this case) is a length + pointer pair. You
need to add .ptr on content with a cast to get to const(char)*.
Thanks for yo
Hi,
I've recently started looking into D, and I'm afraid i'm gonna
need some support to get me going.
I work mostly on Windows, so i've downloaded the examples from
"https://github.com/AndrejMitrovic/DWinProgramming";. Only these
examples do not work out-of-the-box on my machine (Win10, 64-b
On 27/10/2018 1:36 AM, Mark Moorhen wrote:
Hi,
I've recently started looking into D, and I'm afraid i'm gonna need some
support to get me going.
I work mostly on Windows, so i've downloaded the examples from
"https://github.com/AndrejMitrovic/DWinProgramming";. Only these examples
do not wo
On Friday, 26 October 2018 at 01:58:47 UTC, Heromyth wrote:
Maybe it's better to extend core.thread.Thread by inheriting it.
Am I right? Thanks!
Yes, see the example at
https://dlang.org/phobos/core_thread.html#.Thread
25.10.2018 23:34, Michelle Long пишет:
Ignores spaces: <-
Doesn't: <
Concatenates results: <~
Thank you for sharing your results!
14 matches
Mail list logo