Where I download Digital Mars C Preprocessor sppn.exe?

2022-04-02 Thread Marcone via Digitalmars-d-learn
Where I download Digital Mars C Preprocessor sppn.exe? I need it to use ImportC

Re: Where I download Digital Mars C Preprocessor sppn.exe?

2022-04-02 Thread Marcone via Digitalmars-d-learn
ImportC is deprecated as everything in D is deprecated and abandoned. No link works, every download link is broken as no one cares. All D code is always full of bugs and needs to be corrected by the user before trying to run it, in order to realize that it wasted time. https://dlang.org/spec/

Re: DUB issues

2022-04-18 Thread Marcone via Digitalmars-d-learn
The dub creator shouldn't even remember creating this anymore. It makes me sad when I see that things in D are old, forgotten, outdated, abandoned. D is the best programming language in the world. But nobody appreciates it. It makes me sad when I see the repositories for over 10 years without a

QtE56: QFormBuilder: Error: undefined identifier `QFormBuilder`

2022-04-26 Thread Marcone via Digitalmars-d-learn
I'm trying to load a .ui GUI designed in Qt Designer. I'm following the examples in the links below, but the following error occurs: Error: undefined identifier `QFormBuilder` QFormBuilder qfb = new QFormBuilder(this); setQtObj((qfb.load(":/fQtE56help.ui")).QtObj); * https://github.com/MGWL/

Re: QtE56: QFormBuilder: Error: undefined identifier `QFormBuilder`

2022-04-28 Thread Marcone via Digitalmars-d-learn
On Thursday, 28 April 2022 at 07:02:14 UTC, MGW wrote: Probably did not compile QtE5-master/build/QtE56/qte56core.pro QtE5-master/build/QtE56/qte56widgets.pro Use QMAKE to build a DLL/SO More details by mail: m...@yandex.ru Hi, I didn't compile it as Qt is too big for me to download just to u

Re: QtE56: QFormBuilder: Error: undefined identifier `QFormBuilder`

2022-04-28 Thread Marcone via Digitalmars-d-learn
On Thursday, 28 April 2022 at 07:02:14 UTC, MGW wrote: Probably did not compile QtE5-master/build/QtE56/qte56core.pro QtE5-master/build/QtE56/qte56widgets.pro Use QMAKE to build a DLL/SO More details by mail: m...@yandex.ru I sent you an email. Could you answer me and send me these dlls for W

Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-19 Thread Marcone via Digitalmars-d-learn
Using -L/SUBSYSTEM:windows user32.lib Error: lld-link: error: undefined symbol: _WinMain@16 referenced by msvcrt120.lib(msvcrt_stub2.obj):(_WinMainCRTStartup) Error: linker exited with status 1

Re: Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-19 Thread Marcone via Digitalmars-d-learn
On Thursday, 19 May 2022 at 19:35:20 UTC, Adam D Ruppe wrote: On Thursday, 19 May 2022 at 19:29:25 UTC, Marcone wrote: Using -L/SUBSYSTEM:windows user32.lib you using a main() function right? Please note when compiling on Win64, you need to explicitly list -Lgdi32.lib -Luser32.lib on the bui

Re: Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-19 Thread Marcone via Digitalmars-d-learn
On Thursday, 19 May 2022 at 20:33:34 UTC, Adam D Ruppe wrote: On Thursday, 19 May 2022 at 20:20:49 UTC, Marcone wrote: I am using a main() function. I am compiling on Windows x86 32 bits. I am using DMD 2.100.0 This error is only in version 2.100.0 of DMD. Are you using the `-L/entry:mainCRTSt

Re: Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-19 Thread Marcone via Digitalmars-d-learn
On Thursday, 19 May 2022 at 22:13:06 UTC, Adam Ruppe wrote: On Thursday, 19 May 2022 at 21:41:50 UTC, Marcone wrote: Are you using the `-L/entry:mainCRTStartup` or the `L/entry:wmainCRTStartup` ? -L/entry:mainCRTStartup try the w one too. both doing the same result? Both is doing the same

Re: Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-20 Thread Marcone via Digitalmars-d-learn
On Friday, 20 May 2022 at 13:16:00 UTC, frame wrote: On Thursday, 19 May 2022 at 20:20:49 UTC, Marcone wrote: I am using a main() function. I am compiling on Windows x86 32 bits. I am using DMD 2.100.0 This error is only in version 2.100.0 of DMD. Did you try 2.099 too? Because the default bu

Re: Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-26 Thread Marcone via Digitalmars-d-learn
On Friday, 20 May 2022 at 13:16:00 UTC, frame wrote: On Thursday, 19 May 2022 at 20:20:49 UTC, Marcone wrote: I am using a main() function. I am compiling on Windows x86 32 bits. I am using DMD 2.100.0 This error is only in version 2.100.0 of DMD. Did you try 2.099 too? Because the default bu

Re: UI Library

2022-06-10 Thread Marcone via Digitalmars-d-learn
On Friday, 20 May 2022 at 02:37:48 UTC, harakim wrote: I need to write a piece of software to track and categorize some purchases. It's the kind of thing I could probably write in a couple of hours in C#/Java + html/css/javascript. However, something keeps drawing me to D and as this is a simpl

Re: UI Library

2022-06-10 Thread Marcone via Digitalmars-d-learn
On Friday, 20 May 2022 at 02:37:48 UTC, harakim wrote: I need to write a piece of software to track and categorize some purchases. It's the kind of thing I could probably write in a couple of hours in C#/Java + html/css/javascript. However, something keeps drawing me to D and as this is a simpl

ePub/Mobi/AZW3/PDF of Phobos Runtime Library

2022-06-28 Thread Marcone via Digitalmars-d-learn
Beloved, I love programming in D. D is my favorite programming language. I'm not a professional programmer, but I love to program. I would like to learn D deeply. Most programming languages have a PDF/CHM/MOBI/ePub version of the standard library. But D still doesn't have such a portable ver

Re: ePub/Mobi/AZW3/PDF of Phobos Runtime Library

2022-06-28 Thread Marcone via Digitalmars-d-learn
On Tuesday, 28 June 2022 at 19:06:48 UTC, Steven Schveighoffer wrote: On 6/28/22 2:42 PM, Marcone wrote: [...] We used to have this, it wasn't used, and keeping it building was a drain on resources. What is wrong with the online docs? What dissemination do you think could happen if we had it

Re: ePub/Mobi/AZW3/PDF of Phobos Runtime Library

2022-06-28 Thread Marcone via Digitalmars-d-learn
On Tuesday, 28 June 2022 at 20:38:10 UTC, forkit wrote: On Tuesday, 28 June 2022 at 18:42:11 UTC, Marcone wrote: [...] So assuming i understand what you're asking for here, it already exists. When you download D, you get a directory named 'html'. In that directory is a file named 'index.ht

Re: ePub/Mobi/AZW3/PDF of Phobos Runtime Library

2022-06-28 Thread Marcone via Digitalmars-d-learn
Is there any way to do this automatically like Python? https://docs.python.org/3/download.html

What do you think about using Chat GPT to create functions in D?

2023-04-03 Thread Marcone via Digitalmars-d-learn
What do you think about using Chat GPT to create functions in D? I asked Chat-GPT to create a function in D that was similar to the rsplit() function in Python. It returned this code to me: import std.algorithm; import std.array; import std.string; string[] rsplit(string input, string separat

How static link dll msvcr120.dll?

2023-05-26 Thread Marcone via Digitalmars-d-learn
How can I static link msvcr120.dll using dmd?

Re: How make a Dlang with Windows GUI x64 without console?

2023-05-26 Thread Marcone via Digitalmars-d-learn
On Friday, 26 May 2023 at 19:15:16 UTC, ryuukk_ wrote: On Friday, 26 May 2023 at 18:05:38 UTC, Marcone wrote: How can I hide console of a window GUI on Windows x64? I need run with -m64 Someone asked the exact same thing yesterday, check their post: https://forum.dlang.org/thread/azlraopxmidt

Re: How make a Dlang with Windows GUI x64 without console?

2023-05-26 Thread Marcone via Digitalmars-d-learn
On Friday, 26 May 2023 at 19:17:28 UTC, John Chapman wrote: On Friday, 26 May 2023 at 18:05:38 UTC, Marcone wrote: How can I hide console of a window GUI on Windows x64? I need run with -m64 -L/SUBSYSTEM:Windows And if you're using 'main' as the entry point rather than 'WinMain': -L/ENTRY:

Re: How static link dll msvcr120.dll?

2023-05-28 Thread Marcone via Digitalmars-d-learn
On Friday, 26 May 2023 at 12:29:15 UTC, Marcone wrote: How can I static link msvcr120.dll using dmd? Please, could someone tell me if it is possible to link the msvcr120.dll library to the program's executable using the dmd compiler? Because I would like my program to remain portable.

Re: How can I use Linker flags using DMD?

2023-05-29 Thread Marcone via Digitalmars-d-learn
On Monday, 29 May 2023 at 22:48:29 UTC, Ali Çehreli wrote: On 5/29/23 07:29, Marcone wrote: I want send flags to linker when using dmd.exe compiler. -L does it. Yes, -L-L can happen. :) https://dlang.org/dmd-linux.html Ali Can you help me static link dll msvcr120.dll in my x64 dlang pro

Re: How static link dll msvcr120.dll?

2023-06-01 Thread Marcone via Digitalmars-d-learn
On Tuesday, 30 May 2023 at 05:18:11 UTC, novice2 wrote: you cannot "static link dll", "d" in "dll" is "dynamic". you can implicity or explicity load dll. https://learn.microsoft.com/en-us/cpp/build/linking-an-executable-to-a-dll?view=msvc-170 may be you mean static link msvcr120.lib? i am not w

How decode encoded Base64 to string text?

2019-11-08 Thread Marcone via Digitalmars-d-learn
I can encode "Helo World!" to Base64 and get "TWFyY29uZQ==", but if I try to decode "TWFyY29uZQ==" I can not recovery "Helo World!" but [77, 97, 114, 99, 111, 110, 101]. How can I recover "Helo World!" when decode? Thank you. import std; void main(){ string text = "Helo World!";

Re: How decode encoded Base64 to string text?

2019-11-08 Thread Marcone via Digitalmars-d-learn
On Friday, 8 November 2019 at 12:36:37 UTC, Aldo wrote: On Friday, 8 November 2019 at 11:46:44 UTC, Marcone wrote: I can encode "Helo World!" to Base64 and get "TWFyY29uZQ==", but if I try to decode "TWFyY29uZQ==" I can not recovery "Helo World!" but [77, 97, 114, 99, 111, 110, 101]. How can I

I need "duic.cpp" already compiled for .exe for convert .ui files to .d for Dlang

2019-11-08 Thread Marcone via Digitalmars-d-learn
Hi, I'm at the beginning of Dlang studies. I want to create a graphical interface for my program. I use Qt Designer to draw the GUI and save to .ui file. Could someone send me the file "duic.exe" which converts .ui files into .d for Dlang? I need the "duic.cpp" already compiled for .exe. I alre

Alias sleep(int) for Thread.sleep(dur!("seconds")( int ));

2019-11-12 Thread Marcone via Digitalmars-d-learn
I am using this function to sleep, but I want a simple Alias. How can I alias this? // Function sleep(int) void sleep(int seconds){ Thread.sleep(dur!("seconds")( seconds )); } sleep(1); // Using function.

Re: Alias sleep(int) for Thread.sleep(dur!("seconds")( int ));

2019-11-12 Thread Marcone via Digitalmars-d-learn
On Tuesday, 12 November 2019 at 22:26:48 UTC, Daniel Kozak wrote: On Tuesday, 12 November 2019 at 21:24:54 UTC, Marcone wrote: I am using this function to sleep, but I want a simple Alias. How can I alias this? // Function sleep(int) void sleep(int seconds){ Thread.sleep(dur!("seconds"

Re: Alias sleep(int) for Thread.sleep(dur!("seconds")( int ));

2019-11-12 Thread Marcone via Digitalmars-d-learn
On Tuesday, 12 November 2019 at 22:26:48 UTC, Daniel Kozak wrote: On Tuesday, 12 November 2019 at 21:24:54 UTC, Marcone wrote: I am using this function to sleep, but I want a simple Alias. How can I alias this? // Function sleep(int) void sleep(int seconds){ Thread.sleep(dur!("seconds"

Dlang + QtE5 + "Qt Designer": How convert .ui to .d Grafic Interface?

2019-11-14 Thread Marcone via Digitalmars-d-learn
Hi, I use Dlang with QtE5 to make my programs with GUI. I want to design my program with "Qt Designer" and convert .ui file to .d file for use with Dlang + QtE5. In Python, Ruby, C++ you can designe GUI using "Qt Designer" and convert to respective language using uic.exe. I found this duic

How bundles a Dlang application and all its dependencies into a single .exe package?

2019-12-01 Thread Marcone via Digitalmars-d-learn
My program have Qt5 GUI that use dlls, icons, pictures, etc. How bundles a Dlang application and all its dependencies into a single .exe package?

Slice/Substr [0..?lastIndexOf(".")] How refer itself without create a variable?

2019-12-05 Thread Marcone via Digitalmars-d-learn
Simple example: writeln("Hi\nHow are you?\nGood".splitLines()[0][0..?lastIndexOf(r"\")]); How to refer to this string in lastIndexOf() without create a variable? Thank you.

How to invert bool false/true in alias compose?

2019-12-06 Thread Marcone via Digitalmars-d-learn
import std; alias cmd = compose!(to!bool, wait, spawnShell, to!string); void main(){ writeln(cmd("where notepad.exe")); } Result: C:\Windows\System32\notepad.exe C:\Windows\notepad.exe false The result show "false" because good spawnshell command return 0 and 0 to bool is false. Bu

Re: How to invert bool false/true in alias compose?

2019-12-06 Thread Marcone via Digitalmars-d-learn
On Saturday, 7 December 2019 at 04:05:23 UTC, mipri wrote: On Saturday, 7 December 2019 at 04:00:53 UTC, Marcone wrote: import std; alias cmd = compose!(to!bool, wait, spawnShell, to!string); void main(){ writeln(cmd("where notepad.exe")); } Result: C:\Windows\System32\notepad.exe C

How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-08 Thread Marcone via Digitalmars-d-learn
I want to add version to my program. I have configurated my version file "version.txt", but I dont know how link this file to my program. If Need spec file, please send the exemple code of spec. Or is is possible add version file by dmd command line or resources. Thank you.

Re: How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-08 Thread Marcone via Digitalmars-d-learn
On Sunday, 8 December 2019 at 20:56:05 UTC, mipri wrote: On Sunday, 8 December 2019 at 20:50:05 UTC, Marcone wrote: I want to add version to my program. I have configurated my version file "version.txt", but I dont know how link this file to my program. If Need spec file, please send the exem

How Use/Load/Recovery Files in resource.res files?

2019-12-08 Thread Marcone via Digitalmars-d-learn
I have added files inside resource.res. The icon.ico is automated used for exe program icon. But I don't know how use others files inside resource res. How Use/Load/Recovery Files in resource.res files?

Re: How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-10 Thread Marcone via Digitalmars-d-learn
On Tuesday, 10 December 2019 at 07:23:00 UTC, rumbu wrote: On Sunday, 8 December 2019 at 20:50:05 UTC, Marcone wrote: I want to add version to my program. I have configurated my version file "version.txt", but I dont know how link this file to my program. If Need spec file, please send the ex

Re: How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-10 Thread Marcone via Digitalmars-d-learn
On Tuesday, 10 December 2019 at 09:48:11 UTC, ShadoLight wrote: On Tuesday, 10 December 2019 at 07:23:00 UTC, rumbu wrote: [...] To add to Rumbo's comment: to compile a *.rc to *.res file you will need a resource compiler. [...] Hi, I compile resource using windres.exe of MinGW, Can you s

Re: How add "version.txt" Version File by Command Line or by resources.res using dmd.exe

2019-12-10 Thread Marcone via Digitalmars-d-learn
On Sunday, 8 December 2019 at 20:50:05 UTC, Marcone wrote: I want to add version to my program. I have configurated my version file "version.txt", but I dont know how link this file to my program. If Need spec file, please send the exemple code of spec. Or is is possible add version file by d

How use Resedit Dialogs + Dlang?

2019-12-14 Thread Marcone via Digitalmars-d-learn
There's a way to create simple GUI for Dlang using Resedit? How?

Re: How use Resedit Dialogs + Dlang?

2019-12-15 Thread Marcone via Digitalmars-d-learn
On Sunday, 15 December 2019 at 13:19:21 UTC, JN wrote: On Sunday, 15 December 2019 at 04:00:14 UTC, Marcone wrote: There's a way to create simple GUI for Dlang using Resedit? How? Do you know how to do it with C++? It should work the same in D, just use the WinApi bindings for calls. No. I

Re: What kind of Editor, IDE you are using and which one do you like for D language?

2019-12-24 Thread Marcone via Digitalmars-d-learn
On Sunday, 22 December 2019 at 17:20:51 UTC, BoQsc wrote: There are lots of editors/IDE's that support D language: https://wiki.dlang.org/Editors What kind of editor/IDE are you using and which one do you like the most? I am using "Sublime Text" for code Dlang.

How create a function that receive a function and run it in another threading?

2019-12-26 Thread Marcone via Digitalmars-d-learn
import std; import core.thread; auto threading(lazy void fun){ return task!fun().executeInNewThread(); } void main(){ threading(writeln("Hello World!")); } I want to create a function threading() to run some function in other threading, but I get this error bellow. How can I get su

Re: How create a function that receive a function and run it in another threading?

2019-12-27 Thread Marcone via Digitalmars-d-learn
On Friday, 27 December 2019 at 07:06:52 UTC, mipri wrote: On Friday, 27 December 2019 at 06:08:16 UTC, Marcone wrote: import std; import core.thread; auto threading(lazy void fun){ return task!fun().executeInNewThread(); } void main(){ threading(writeln("Hello World!")); } I want t

How can I use a file that is inside resource .res?

2019-12-28 Thread Marcone via Digitalmars-d-learn
I created a file called "resource.rc" with this content: 1 ICON icon.ico 2 EXE app.exe And compiled with this command: windres.exe resource.rc resource.res And I binf it to my program with this command: dmd Program.d resource.res Now I have a Program.exe with "app.exe" inside. Now the file

Re: Concatenation/joining strings together in a more readable way

2019-12-29 Thread Marcone via Digitalmars-d-learn
On Wednesday, 25 December 2019 at 13:07:44 UTC, mipri wrote: On Wednesday, 25 December 2019 at 12:39:08 UTC, BoQsc wrote: Are there any other ways to join two strings without Tilde ~ character? I can't seems to find anything about Tilde character concatenation easily, nor the alternatives to it

Re: Concatenation/joining strings together in a more readable way

2019-12-30 Thread Marcone via Digitalmars-d-learn
On Monday, 30 December 2019 at 09:41:55 UTC, mipri wrote: On Monday, 30 December 2019 at 06:47:37 UTC, Marcone wrote: Use Python format() style: import std; import std: Format = format; // format() string format(T...)(T text){ string texto = text[0]; foreach(count, i; text[1..$

Re: Concatenation/joining strings together in a more readable way

2019-12-31 Thread Marcone via Digitalmars-d-learn
On Monday, 30 December 2019 at 14:56:59 UTC, mipri wrote: On Monday, 30 December 2019 at 10:23:14 UTC, Marcone wrote: On Monday, 30 December 2019 at 09:41:55 UTC, mipri wrote: This leaks too much. writeln("Helo {} {}".format("xx", "name")); // Helo xx name writeln("Helo {} {}".format("{}

Re: Concatenation/joining strings together in a more readable way

2019-12-31 Thread Marcone via Digitalmars-d-learn
On Monday, 30 December 2019 at 14:56:59 UTC, mipri wrote: On Monday, 30 December 2019 at 10:23:14 UTC, Marcone wrote: On Monday, 30 December 2019 at 09:41:55 UTC, mipri wrote: This leaks too much. writeln("Helo {} {}".format("xx", "name")); // Helo xx name writeln("Helo {} {}".format("{}

Re: Concatenation/joining strings together in a more readable way

2020-01-01 Thread Marcone via Digitalmars-d-learn
On Wednesday, 25 December 2019 at 12:39:08 UTC, BoQsc wrote: Are there any other ways to join two strings without Tilde ~ character? I can't seems to find anything about Tilde character concatenation easily, nor the alternatives to it. Can someone share some knowledge on this or at least point

Re: Concatenation/joining strings together in a more readable way

2020-01-02 Thread Marcone via Digitalmars-d-learn
On Wednesday, 25 December 2019 at 12:39:08 UTC, BoQsc wrote: Are there any other ways to join two strings without Tilde ~ character? I can't seems to find anything about Tilde character concatenation easily, nor the alternatives to it. Can someone share some knowledge on this or at least point

How run program with RDMD when code need load C++ code compiled by DMC to .obj?

2020-01-02 Thread Marcone via Digitalmars-d-learn
Using dmd run compile very whell: dmd Program.obj cpp.obj But with rdmd not work.

Re: How run program with RDMD when code need load C++ code compiled by DMC to .obj?

2020-01-02 Thread Marcone via Digitalmars-d-learn
On Friday, 3 January 2020 at 05:12:21 UTC, Marcone wrote: Using dmd run compile very whell: dmd Program.obj cpp.obj But with rdmd not work. extern(C++) void teste(); void main(){ teste(); } OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights rese

How load icon from resource using LoadImage?

2020-01-05 Thread Marcone via Digitalmars-d-learn
I am using this code to load icon from local directory, but I want to load icon from resource.res file: wndclass.hIcon = LoadImage( NULL, "icon.ico", IMAGE_ICON, 0, 0, LR_LOADFROMFILE| LR_SHARED | LR_LOADTRANSPARENT);

Re: How load icon from resource using LoadImage?

2020-01-05 Thread Marcone via Digitalmars-d-learn
On Sunday, 5 January 2020 at 15:13:17 UTC, Rumbu wrote: On Sunday, 5 January 2020 at 13:33:35 UTC, Marcone wrote: I am using this code to load icon from local directory, but I want to load icon from resource.res file: wndclass.hIcon = LoadImage( NULL, "icon.ico", IMAGE_ICON, 0, 0, LR_LOADFRO

Win32 Api: How create a Color Dialog?

2020-01-09 Thread Marcone via Digitalmars-d-learn
I am creating a GUI using winsamp.d as model. See the window here: https://i.ibb.co/ZJ4v2KD/Sem-t-tulo.png I want to ask a user for choose a color when click Configuration/Color, and then change backgroud color of GUI. But how can I create a Color Dialog? There's dlang example in the web and I

Re: Win32 Api: How create a Color Dialog?

2020-01-10 Thread Marcone via Digitalmars-d-learn
On Thursday, 9 January 2020 at 21:55:26 UTC, Dennis wrote: On Thursday, 9 January 2020 at 13:04:33 UTC, Marcone wrote: [...] Windows has the 'common dialog' module with a ChooseColor function you can use. [...] Very Good! Working very well!

Win32 Api: How create Open/"Save as" Dialog?

2020-01-10 Thread Marcone via Digitalmars-d-learn
How create "Open" and "Save as" Dialog using "Win32 Api" and Dlang? Please send me a simple example code in Dlang. Thank you very much.

Re: Win32 Api: How create Open/"Save as" Dialog?

2020-01-10 Thread Marcone via Digitalmars-d-learn
On Friday, 10 January 2020 at 14:52:36 UTC, Adam D. Ruppe wrote: On Friday, 10 January 2020 at 14:48:49 UTC, Marcone wrote: How create "Open" and "Save as" Dialog using "Win32 Api" and Dlang? Please send me a simple example code in Dlang. Thank you very much. You just call GetOpenFileName or

Re: Win32 Api: How create Open/"Save as" Dialog?

2020-01-11 Thread Marcone via Digitalmars-d-learn
On Friday, 10 January 2020 at 15:44:53 UTC, Mike Parker wrote: On Friday, 10 January 2020 at 15:06:07 UTC, Marcone wrote: Very complicated. Can you send me the simple clear code? https://docs.microsoft.com/en-us/windows/win32/dlgbox/using-common-dialog-boxes Not compile in Dlang.

Re: Win32 Api: How create Open/"Save as" Dialog?

2020-01-11 Thread Marcone via Digitalmars-d-learn
On Saturday, 11 January 2020 at 00:12:03 UTC, René Heldmaier wrote: On Friday, 10 January 2020 at 14:48:49 UTC, Marcone wrote: How create "Open" and "Save as" Dialog using "Win32 Api" and Dlang? Please send me a simple example code in Dlang. Thank you very much. Have a look at this website:

Re: Win32 Api: How create Open/"Save as" Dialog?

2020-01-11 Thread Marcone via Digitalmars-d-learn
On Friday, 10 January 2020 at 14:48:49 UTC, Marcone wrote: How create "Open" and "Save as" Dialog using "Win32 Api" and Dlang? Please send me a simple example code in Dlang. Thank you very much. This code works, but I can't get file Path. Someone can help me? import std; import core.sys.windo

Re: Win32 Api: How create Open/"Save as" Dialog?

2020-01-11 Thread Marcone via Digitalmars-d-learn
On Friday, 10 January 2020 at 14:48:49 UTC, Marcone wrote: How create "Open" and "Save as" Dialog using "Win32 Api" and Dlang? Please send me a simple example code in Dlang. Thank you very much. Solution: import std; import core.sys.windows.windows; pragma(lib, "comdlg32"); // Function askop

Re: Win32 Api: How create Open/"Save as" Dialog?

2020-01-12 Thread Marcone via Digitalmars-d-learn
On Saturday, 11 January 2020 at 14:21:25 UTC, Adam D. Ruppe wrote: On Saturday, 11 January 2020 at 12:22:25 UTC, Marcone wrote: wchar[1024] szFileName = 0; ofn.lpstrFile = cast(LPWSTR) szFileName; You shouldn't cast there, just use `szFileName.ptr` instead. ofn.nMaxFile = MAX_PAT

Re: How to remove whitespace from a string

2020-01-17 Thread Marcone via Digitalmars-d-learn
On Thursday, 16 January 2020 at 13:36:10 UTC, Namal wrote: Hello, what is the way to remove whitespace from a string (not only at the beginning and end).. import std; void main(){ string name = " Marvin Will "; writeln(name.replace(" ", "")); // MarvinWill }

How to convert this C++ code to Dlang? Please send me Dlang version of this C++ code

2020-01-27 Thread Marcone via Digitalmars-d-learn
#include #include #include #include "resource.h" #include HINSTANCE hInst; BOOL CALLBACK DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch(uMsg) { case WM_INITDIALOG: { } return TRUE; case WM_CLOSE: { EndDialog(hwndDlg, 0);

Re: How to convert this C++ code to Dlang? Please send me Dlang version of this C++ code

2020-01-27 Thread Marcone via Digitalmars-d-learn
On Monday, 27 January 2020 at 13:07:20 UTC, rumbu wrote: On Monday, 27 January 2020 at 11:34:47 UTC, Marcone wrote: [...] Translated (including errors & comments): import core.sys.windows.windows; import core.sys.windows.commctrl; import std.stdio; HINSTANCE hInst; extern(Windows): BOOL D

Re: How to convert this C++ code to Dlang? Please send me Dlang version of this C++ code

2020-01-27 Thread Marcone via Digitalmars-d-learn
On Monday, 27 January 2020 at 13:41:13 UTC, Ferhat Kurtulmuş wrote: On Monday, 27 January 2020 at 13:24:03 UTC, Marcone wrote: On Monday, 27 January 2020 at 13:07:20 UTC, rumbu wrote: [...] Thank you very much! But I have this error when I try to compile: Error 42: Symbol Undefined _InitCo

How to convert "string" to const(wchar)* ?

2020-01-28 Thread Marcone via Digitalmars-d-learn
How to convert "string" to const(wchar)* ? The code bellow is making confuse strange characters. cast(wchar*) str

How change window Backgound Color when press a Button when using "ResEdit Resource Editor" to design?

2020-01-29 Thread Marcone via Digitalmars-d-learn
I created a GUI using "ResEdit Resource Editor" and embeded to Dlang using this code above. Now I want to change the window Backgound Color when press a Button. How can I make it? import core.sys.windows.windows; import core.sys.windows.commctrl; import std.stdio; pragma(lib, "gdi32.lib"); pra

Re: How change window Backgound Color when press a Button when using "ResEdit Resource Editor" to design?

2020-01-29 Thread Marcone via Digitalmars-d-learn
On Thursday, 30 January 2020 at 04:29:42 UTC, bauss wrote: On Thursday, 30 January 2020 at 03:49:29 UTC, Marcone wrote: I created a GUI using "ResEdit Resource Editor" and embeded to Dlang using this code above. Now I want to change the window Backgound Color when press a Button. How can I make

How make Executable Dlang EXE ask for "Run as Administrator"?

2020-01-31 Thread Marcone via Digitalmars-d-learn
I created a program in Dlang and compiled to exe using dmd. But my program need administrator privileges. How can I make executable dlang program ask for administrator privileges on start up program?

How add resource.res in RDMD

2020-02-01 Thread Marcone via Digitalmars-d-learn
I like use rdmd when I am programming. But I need that the program use resource file becouse I am creating program with gui win32api. How can I add resource when use rdmd?

Re: How add resource.res in RDMD

2020-02-02 Thread Marcone via Digitalmars-d-learn
On Sunday, 2 February 2020 at 06:03:06 UTC, Marcone wrote: I like use rdmd when I am programming. But I need that the program use resource file becouse I am creating program with gui win32api. How can I add resource when use rdmd? No one knows how add resource .res file in rdmd?

Re: How add resource.res in RDMD

2020-02-03 Thread Marcone via Digitalmars-d-learn
On Monday, 3 February 2020 at 05:11:30 UTC, Boris Carvajal wrote: On Monday, 3 February 2020 at 03:03:20 UTC, Marcone wrote: On Sunday, 2 February 2020 at 06:03:06 UTC, Marcone wrote: I like use rdmd when I am programming. But I need that the program use resource file becouse I am creating prog

Re: How make Executable Dlang EXE ask for "Run as Administrator"?

2020-02-03 Thread Marcone via Digitalmars-d-learn
On Saturday, 1 February 2020 at 08:14:19 UTC, Ferhat Kurtulmuş wrote: On Saturday, 1 February 2020 at 06:26:04 UTC, Marcone wrote: [...] Disclaimer: did not tried. You must somehow embed this manifest file into your exe using some linker parameter. Or put this manifest next to your exe by n

What is wrong with this function that I can not get resource content?

2020-02-05 Thread Marcone via Digitalmars-d-learn
// Function get_resource() void get_resource(const(wchar)* id, const(wchar)* tipo, const(wchar)* path_name){ HRSRC file = FindResource(null, id, tipo); DWORD size = SizeofResource(NULL, file); HGLOBAL load = LoadResource(NULL, file); HANDLE new_file = CreateFile(path_nam

Re: What is wrong with this function that I can not get resource content?

2020-02-05 Thread Marcone via Digitalmars-d-learn
I get resource "melancia.bmp" but the file is corrupted.

Re: What is wrong with this function that I can not get resource content?

2020-02-05 Thread Marcone via Digitalmars-d-learn
Sorry! Solved. Just need add # in this line: get_resource("#300", "BMP", "melancia.bmp");

How to converte string to wstring[]?

2020-02-06 Thread Marcone via Digitalmars-d-learn
How to converte "string" to wstring[] in Dlang?

Re: How make Executable Dlang EXE ask for "Run as Administrator"?

2020-02-07 Thread Marcone via Digitalmars-d-learn
Solved adding this code in resource.rc, converted to resource.res and linked to .d source. This code add the file "manifest.manifest" to resource. 1 24 "manifest.manifest"

Re: total newbie + IDE

2020-02-08 Thread Marcone via Digitalmars-d-learn
You don't need an IDE for run Dlang. I Use "Sublime Text". Very good for Dlang.

Re: How to converte string to wstring[]?

2020-02-08 Thread Marcone via Digitalmars-d-learn
On Friday, 7 February 2020 at 06:20:09 UTC, novice2 wrote: import std.conv: to; string str = "test1"; wstring[] wstr = [to!wstring(str)]; Thank you!

Re: books for learning D

2020-02-09 Thread Marcone via Digitalmars-d-learn
Programming in D - Tutorial and Reference 1st Edition Free PDF Book. Download: http://ddili.org/ders/d.en/index.html

How make wsatring or dstring default for string and literals?

2020-02-24 Thread Marcone via Digitalmars-d-learn
I live in Brazil and speak português brasileiro and need make programs that is good with words like ã, á, ç, ê, etc. How can I make wstring or dstring default for string and literals? I don't want to explicit this every time.

Re: How make wsatring or dstring default for string and literals?

2020-02-24 Thread Marcone via Digitalmars-d-learn
On Monday, 24 February 2020 at 19:28:43 UTC, Adam D. Ruppe wrote: On Monday, 24 February 2020 at 19:27:04 UTC, Marcone wrote: I live in Brazil and speak português brasileiro and need make programs that is good with words like ã, á, ç, ê, etc. Regular string works with those just fine too.

DMD: Is it possible change compile time errors to runtime errors in Dlang?

2020-03-05 Thread Marcone via Digitalmars-d-learn
Is it possible change compile time errors to runtime errors in Dlang? If yes, how can I make it?

Re: DMD: Is it possible change compile time errors to runtime errors in Dlang?

2020-03-06 Thread Marcone via Digitalmars-d-learn
On Friday, 6 March 2020 at 05:31:57 UTC, Mathias Lang wrote: On Friday, 6 March 2020 at 04:56:28 UTC, Marcone wrote: Is it possible change compile time errors to runtime errors in Dlang? If yes, how can I make it? No it's not possible, D is a statically typed language. Why would you want erro

How can I append PATH to environment["PATH"] in runtime?

2020-03-12 Thread Marcone via Digitalmars-d-learn
environment["PATH"] ~= r";D:\folder\"; // Error

Re: How can I append PATH to environment["PATH"] in runtime?

2020-03-13 Thread Marcone via Digitalmars-d-learn
On Friday, 13 March 2020 at 13:28:01 UTC, Steven Schveighoffer wrote: On 3/13/20 2:08 AM, Marcone wrote: environment["PATH"] ~= r";D:\folder\"; // Error Did you try the long way? environment["PATH"] = environment["PATH"] ~ r";D:\folder\"; It would be nice to have environment support opIndexO

How catch any error in Dlang like Python try-except?

2020-03-14 Thread Marcone via Digitalmars-d-learn
How catch any error in Dlang like Python tray-except? It is very useful when making tests. But only who came from interpreted languages can understand. Exemple: import std; void main() { try { writelnX("try function that not exist"); } catch (Throwable

How package Dlang in a standalone portable executable?

2020-03-26 Thread Marcone via Digitalmars-d-learn
I need package Dlang in a standalone portable executable. I need packcages all dependencies, dlls, files, etc in one executable file.

How user dub packages in dmd without dub.exe ?

2020-04-04 Thread Marcone via Digitalmars-d-learn
I want import modules from dub packages in my program.d and run using dmd.exe without dub.exe. How can I make it? Becouse when I try to import it says that can not found.

Re: How user dub packages in dmd without dub.exe ?

2020-04-05 Thread Marcone via Digitalmars-d-learn
On Sunday, 5 April 2020 at 14:02:19 UTC, Baby Beaker wrote: On Saturday, 4 April 2020 at 21:54:34 UTC, Andre Pany wrote: On Saturday, 4 April 2020 at 20:21:03 UTC, Marcone wrote: [...] Ag the end dub is calling DMD/LDC with some arguments. You can run dub with verbose output and check the ar

Re: How user dub packages in dmd without dub.exe ?

2020-04-12 Thread Marcone via Digitalmars-d-learn
On Sunday, 5 April 2020 at 14:19:40 UTC, WebFreak001 wrote: On Sunday, 5 April 2020 at 14:02:19 UTC, Baby Beaker wrote: On Saturday, 4 April 2020 at 21:54:34 UTC, Andre Pany wrote: On Saturday, 4 April 2020 at 20:21:03 UTC, Marcone wrote: [...] [...] If you can copy the D packages from the

How convert String to Hex?

2020-04-18 Thread Marcone via Digitalmars-d-learn
How convert String to Hex? Example: string text = "Hello World"; // Converted to Hex = 48656c6c6f20576f726c64

How make DMD auto link imported modules?

2020-04-21 Thread Marcone via Digitalmars-d-learn
When I create a module, for exemple mymodule.d and import im my main program using "import mymodule" I need add mymodule.d in DMD command line manually. How can make it automatic?

  1   2   3   >