www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - WinMain in D?

reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
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?
Jul 07 2004
next sibling parent "Walter" <newshound digitalmars.com> writes:
"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
Jul 07 2004
prev sibling next sibling parent adi <adi_member pathlink.com> writes:
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?
Jul 07 2004
prev sibling parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
pah :)  thanks guys, i don't know how i was daft enough to miss both that
help section AND the example code.
Jul 07 2004