Thread overview
WinMain in D?
Jul 07, 2004
Walter
Jul 07, 2004
adi
July 07, 2004
i found the windows.d module and started messing around with some basic
windows stuff.  now i'd like to make a windows app.. but i need to be able
to have a WinMain function (which takes an HINSTANCE, HINSTANCE, LPSTR, and
int).  however D only allows me to use () or (char[][]) for main's
parameters.

has anyone been able to do this?


July 07, 2004
"Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message news:cchfmd$1jmi$1@digitaldaemon.com...
> i found the windows.d module and started messing around with some basic windows stuff.  now i'd like to make a windows app.. but i need to be able to have a WinMain function (which takes an HINSTANCE, HINSTANCE, LPSTR,
and
> int).  however D only allows me to use () or (char[][]) for main's
> parameters.
>
> has anyone been able to do this?

Sure. See www.digitalmars.com/d/windows.html


July 07, 2004
You can have a look in the samples directory of your D instalation. There you
will see a sample of a window created using WinApi. To compile it you have to
add to the compiler the argument gdi32.lib (ass seen in all.sh in the same
directory)
Good luck

In article <cchfmd$1jmi$1@digitaldaemon.com>, Jarrett Billingsley says...
>
>i found the windows.d module and started messing around with some basic
>windows stuff.  now i'd like to make a windows app.. but i need to be able
>to have a WinMain function (which takes an HINSTANCE, HINSTANCE, LPSTR, and
>int).  however D only allows me to use () or (char[][]) for main's
>parameters.
>
>has anyone been able to do this?
>
>


July 07, 2004
pah :)  thanks guys, i don't know how i was daft enough to miss both that help section AND the example code.