Re: arsd-minigui - couple of questions

2022-03-28 Thread Adam Ruppe via Digitalmars-d-learn
In fact, using a pragma now, I think I got it so you don't even need the manifest now (the pragma includes a default one now). Only works when doing dmd -m32mscoff or dmd -m64 builds (which are also what dub uses fyi), will NOT work with a default dmd no-switch build.

Re: arsd-minigui - couple of questions

2022-03-28 Thread Adam Ruppe via Digitalmars-d-learn
oooh it actually is even easier than I thought, just a changed flag plus the manifest. Just pushed to minigui master. only ended up being 4 lines for this little thing. Try rebuilding with that AND be sure to use the manifest file too, same as dwt. Then you should be able to find some joy.

Re: How to make a generic function to take a class or struct by reference?

2022-03-28 Thread Ali Çehreli via Digitalmars-d-learn
On 3/27/22 22:32, vit wrote: > int* getX(T)(return auto ref T t) > if(is(T == class) || (is(T == struct) && __traits(isRef, t))){ > return &t.x; > } I also think 'return' parameter is needed but I could not come up with an example where that 'return' provides any more safety. Compiler alr

Re: How to make a generic function to take a class or struct by reference?

2022-03-28 Thread Ali Çehreli via Digitalmars-d-learn
On 3/27/22 09:27, JN wrote: > I would like to have only one definition of getX if possible, because > they both are doing the same thing. I can't remove the ref one, because > without a ref it will pass the struct as a temporary and compiler won't > like that. Combining all responses, the code at

Re: arsd-minigui - couple of questions

2022-03-28 Thread Adam Ruppe via Digitalmars-d-learn
On Monday, 28 March 2022 at 21:10:47 UTC, Sai wrote: FWIW, DWT which uses native controls on windows can show transparent pngs and also both image & text at the same time. However I had to add the following app.exe.manifest Yeah, this tells me they used owner-drawn buttons, which is only supp

Re: arsd-minigui - couple of questions

2022-03-28 Thread Sai via Digitalmars-d-learn
On Monday, 28 March 2022 at 18:03:32 UTC, Adam Ruppe wrote: On Monday, 28 March 2022 at 17:00:42 UTC, sai wrote: 1. I assume arsd-minigui library does not support transparent images by itself, does it? I am trying to show a png image with transparent areas on a button, but those transparent ar

Re: arsd-minigui - couple of questions

2022-03-28 Thread Adam Ruppe via Digitalmars-d-learn
On Monday, 28 March 2022 at 17:00:42 UTC, sai wrote: 1. I assume arsd-minigui library does not support transparent images by itself, does it? I am trying to show a png image with transparent areas on a button, but those transparent areas shows as black color. Well, I tried forwarding the flag

Re: arsd-minigui - couple of questions

2022-03-28 Thread Adam Ruppe via Digitalmars-d-learn
On Monday, 28 March 2022 at 17:00:42 UTC, sai wrote: 1. I assume arsd-minigui library does not support transparent images by itself, does it? I am trying to show a png image with transparent areas on a button, but those transparent areas shows as black color. I added that to simpledisplay las

Re: arsd-minigui - couple of questions

2022-03-28 Thread sai via Digitalmars-d-learn
On Monday, 28 March 2022 at 17:00:42 UTC, sai wrote: 1. I assume arsd-minigui library does not support transparent images by itself, does it? I am trying to show a png image with transparent areas on a button, but those transparent areas shows as black color. 2. I want to show both image and

arsd-minigui - couple of questions

2022-03-28 Thread sai via Digitalmars-d-learn
1. I assume arsd-minigui library does not support transparent images by itself, does it? I am trying to show a png image with transparent areas on a button, but those transparent areas shows as black color. 2. I want to show both image and text on a button, but looks like it shows image or t