From: Hyper Simus on
hye,
is that possible to use the freecommandline bcc32 ilink32 with IUP
toolkit?
as i need to specify the entry point, instead of WinMain and main

if using console -- main
i would get a black command prompt window when i run this
application..

if using windows gui -- WinMain
i couldn't compile.

any idea?
to specify main under windows gui, so, no black command prompt window
shows up.

thanks.
From: Franz Bachler on
Hello,

"Hyper Simus" <hypersimus(a)gmail.com> wrote in message
news:8e0ca5a0-1763-45f7-9e06-4bc25ce256f0(a)s6g2000prg.googlegroups.com...
> hye,
> is that possible to use the freecommandline bcc32 ilink32 with IUP
> toolkit?
> as i need to specify the entry point, instead of WinMain and main
>
> if using windows gui -- WinMain
> i couldn't compile.
>
> any idea?
> to specify main under windows gui, so, no black command prompt window
> shows up.

you can use main under windows gui with
int main(void) or int main(int argc, TCHAR **argv)

bcc32 [-O2] -laa program.c or
bcc32 [-O2] -laa -WU program.c (in Unicode; wmain instead of main)

try this for example:

#include <windows.h>

#ifdef UNICODE
int wmain(int argc, TCHAR **argv)
#else
int main(int argc, TCHAR **argv)
#endif

{
int i;
TCHAR szTitle[48];
TCHAR szText[MAX_PATH+128];

lstrcpy(szText, TEXT(" Hello World! "));

wsprintf(szTitle, TEXT("\n\n Number of Arguments: %d \n"), argc);
lstrcat(szText, szTitle);

for (i=0; i<argc; i++)
{
lstrcat(szText, TEXT("\n"));
lstrcat(szText, argv[i]);
}

lstrcat(szText, TEXT("\n"));
lstrcpy(szTitle, TEXT(" Test "));

MessageBox(NULL, szText, szTitle, MB_OK);

return(0);
}