Here is the "c" code
// *********************************************************************
// Created with bc9 - BASIC To C/C++ Translator (V) 9.1.0.3 (2013/1/10)
// BCX (c) 1999 - 2009 by Kevin Diggins
// *********************************************************************
// Translated for compiling with an ANSI/ISO C Compiler
// On MS Windows
// *********************************************************************
#include <windows.h> // Win32 Header File
#include <windowsx.h> // Win32 Header File
#include <commctrl.h> // Win32 Header File
#include <commdlg.h> // Win32 Header File
#include <mmsystem.h> // Win32 Header File
#include <shellapi.h> // Win32 Header File
#include <shlobj.h> // Win32 Header File
#include <richedit.h> // Win32 Header File
#include <wchar.h> // Win32 Header File
#include <objbase.h> // Win32 Header File
#include <ocidl.h> // Win32 Header File
#include <winuser.h> // Win32 Header File
#include <olectl.h> // Win32 Header File
#include <oaidl.h> // Win32 Header File
#include <ole2.h> // Win32 Header File
#include <oleauto.h> // Win32 Header File
#include <winsock.h> // Win32 Header File
#include <process.h> // dos
#include <conio.h> // dos
#include <direct.h> // dos
#include <io.h> // dos
#include <ctype.h> // dos/linux
#include <fcntl.h> // dos/linux
#include <math.h> // dos/linux
#include <stdio.h> // dos/linux
#include <string.h> // dos/linux
#include <stddef.h> // dos/linux
#include <stdlib.h> // dos/linux
#include <setjmp.h> // dos/linux
#include <time.h> // dos/linux
#include <stdarg.h> // dos/linux
#include <sys/types.h>
#include <sys/stat.h>
// *************************************************
// User's GLOBAL ENUM blocks
// *************************************************
// *************************************************
// System Defined Constants
// *************************************************
#define CCPTR const char*
#define cSizeOfDefaultString 2048
// *************************************************
// User Defined Constants
// *************************************************
// *************************************************
// Standard Prototypes
// *************************************************
// char* BCX_TmpStr(size_t,size_t= 128,int= 1);
char* BCX_TmpStr( size_t,size_t,int);
// char* command (int=-1);
char* command( int);
// *************************************************
// User Defined Types And Unions
// *************************************************
// *************************************************
// System Variables
// *************************************************
static char SPC [2]={32,0}; /* Space */
// *************************************************
// User Global Variables
// *************************************************
static PCHAR *g_argv;
static int g_argc;
// *************************************************
// Standard Macros
// *************************************************
#define BOR |
// *************************************************
// User Prototypes
// *************************************************
int WINAPI WinMain (HINSTANCE,HINSTANCE,LPSTR,int);
void DrawGradient (HDC);
LRESULT CALLBACK WndProc (HWND,UINT,WPARAM,LPARAM);
void DoCmdLine (void);
// *************************************************
// User Global Initialized Arrays
// *************************************************
// *************************************************
// Runtime Functions
// *************************************************
#ifndef BCXTmpStrSize
#define BCXTmpStrSize 2048
#endif
char *BCX_TmpStr (size_t Bites,size_t iPad,int iAlloc)
{
static int StrCnt;
static char *StrFunc[BCXTmpStrSize];
StrCnt=(StrCnt + 1) & (BCXTmpStrSize-1);
if(StrFunc[StrCnt]) {free (StrFunc[StrCnt]); StrFunc[StrCnt] = NULL;}
#if defined BCX_MAX_VAR_SIZE
if(Bites*sizeof(char)>BCX_MAX_VAR_SIZE)
{
printf("Buffer Overflow caught in BCX_TmpStr - requested space of %d EXCEEDS %d\n",(int)(Bites*sizeof(char)),BCX_MAX_VAR_SIZE);
abort();
}
#endif
if(iAlloc) StrFunc[StrCnt]=(char*)calloc(Bites+128,sizeof(char));
return StrFunc[StrCnt];
}
char *command (int nArg)
{
register int i = 0;
char *c = 0, *retstr, *s = GetCommandLine();
if(nArg < i) // return entire commandline
{
while(*s && *s != 32) {
if(*s == 34) while(*++s && *s != 34);
s++;
}
while(isspace((unsigned char)*s))s++;
retstr = BCX_TmpStr(strlen(s)+1,128,1);
strcpy(retstr, s);
if(*(retstr+strlen(retstr)-1)==20) *retstr=0;
return retstr;
}
while(i <= nArg) {
while(isspace((unsigned char)*s)) s++; // skip whitespace
c = s;
if(*s == 34) { // argument starts a quote
while(*++s && *s != 34); // skip till next quote
if(*s) s++; // skip quote itself
}
else {
while(*s && *s != 32) s++;
}
i++;
}
if(*c == 34) {
c++; // skip leading quote
if(*(s-1) == 34) s--; // skip any trailing quotes
}
retstr = BCX_TmpStr((s - c) + 1,128,1);
strncpy(retstr, c, (s - c));
retstr[s-c]=0;
return retstr;
}
// ************************************
// User Subs and Functions
// ************************************
int WINAPI WinMain (HINSTANCE hInst,HINSTANCE hPrev,LPSTR CmdLine,int CmdShow)
{
static MSG Msg;
memset(&Msg,0,sizeof(Msg));
static WNDCLASSEX wce;
memset(&wce,0,sizeof(wce));
static char szAppName[80];
memset(&szAppName,0,sizeof(szAppName));
static HWND hWnd;
memset(&hWnd,0,sizeof(hWnd));
strcpy(szAppName,"HelloWin");
wce.cbSize= sizeof( wce);
wce.style= CS_HREDRAW BOR CS_VREDRAW;
wce.lpfnWndProc= WndProc;
wce.cbClsExtra= 0;
wce.cbWndExtra= 0;
wce.hInstance= hInst;
wce.hIcon= LoadIcon( hInst,"HELLOWIN");
wce.hCursor= LoadCursor( NULL, IDC_ARROW);
wce.hbrBackground= NULL;
wce.lpszMenuName= NULL;
wce.lpszClassName= szAppName;
if(RegisterClassEx( &wce)==0 )
{
MessageBox (GetActiveWindow(),"RegisterClass failed","",0);
return 0;
}
hWnd= CreateWindow( szAppName,"The Hello Program", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL,(HMENU) NULL, hInst, NULL);
if(hWnd==0 )
{
MessageBox (GetActiveWindow(),"Unable to create window","",0);
return 0;
}
ShowWindow(hWnd,CmdShow);
UpdateWindow(hWnd);
while(GetMessage( &Msg,NULL,0,0))
{
TranslateMessage( &Msg);
DispatchMessage( &Msg);
}
return Msg.wParam;
}
void DrawGradient (HDC hDC)
{
static RECT rectFill;
memset(&rectFill,0,sizeof(rectFill));
static RECT rectClient;
memset(&rectClient,0,sizeof(rectClient));
static float fStep;
memset(&fStep,0,sizeof(fStep));
static HBRUSH hBrush;
memset(&hBrush,0,sizeof(hBrush));
static int lOnBand;
memset(&lOnBand,0,sizeof(lOnBand));
GetClientRect(WindowFromDC(hDC), &rectClient);
fStep= rectClient.bottom/ 200;
for(lOnBand=0; lOnBand<=199; lOnBand+=1)
{
SetRect( &rectFill,0,lOnBand*fStep,rectClient.right+1,(lOnBand+1)*fStep);
hBrush= CreateSolidBrush( RGB( 0, 0, 255- lOnBand));
FillRect(hDC, &rectFill,hBrush);
DeleteObject(hBrush);
}
}
LRESULT CALLBACK WndProc (HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam)
{
HDC hDC;
PAINTSTRUCT pPaint;
RECT tRect;
if(Msg==WM_PAINT )
{
hDC= BeginPaint( hWnd, &pPaint);
GetClientRect(hWnd, &tRect);
SetBkMode(hDC,TRANSPARENT);
SetTextColor(hDC,RGB(255,255,255));
DrawText(hDC,"Hello, Windows!",-1, &tRect,DT_SINGLELINE BOR DT_CENTER BOR DT_VCENTER);
EndPaint(hWnd, &pPaint);
return 1;
}
if(Msg==WM_ERASEBKGND )
{
hDC=( HDC) wParam;
DrawGradient(hDC);
return 1;
}
if(Msg==WM_DESTROY )
{
PostQuitMessage(0);
}
return DefWindowProc(hWnd, Msg, wParam, lParam); // CallBackFlag
}
void DoCmdLine (void)
{
int i=0;
static char cmd[32][cSizeOfDefaultString];
static char* argv[32];
strcpy(cmd[0],SPC);
for(;;)
{
if(strlen(command(i)))
{
strcpy(cmd[i],command(i));
argv[i] =( char*) cmd[ i];
}
else
{
goto L1003;
}
i++;
}
L1003:;
g_argc= i;
g_argv= argv;
}