Article View: borland.public.cppbuilder.nativeapi
Article #8898Re: The Most Compressed
From: Bob Gonder
Date: Tue, 31 Aug 2004 01:14
Date: Tue, 31 Aug 2004 01:14
33 lines
1949 bytes
1949 bytes
Pedram wrote:
>My Hello World sample that is like below :
> #include <windows.h>
> #include "dialogs.hpp"
> #pragma hdrstop
> #pragma argsused
> WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
>lpCmdLine, int nCmdShow)
> {
> ShowMessage("This is a Hello World!");
> return 0;
> }
That is not a console program.
In your original post you said
>When I'm using BCB5 -> File -> New -> Consol
>Without VCL ,and etc I have 7 Kilobytes file
Console programs start at main, not WinMain.
Also, ShowMessage is a VCL function. You will never get "small"
programs with the VCL. But, you don't have to use VCL. Everything you
can do with VCL, you can do with the native Win api.
Try this one:
Hello.c
------
#include <windows.h>
int main(void)
{
MessageBox( 0, "This is a Hello World!", "From the World", MB_OK);
return 0;
}
Technical Details
Message-ID:
<vmj7j0l2kdgu53vgpgnlb5nvo2e5cpabna@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4130d6c2@newsgroups.borland.com> <4505j0d7fmr3dbl9fpabplhbpvv0gg50i5@4ax.com> <4133585a@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8f88fecd49aea605 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: The Most Compressed Date: Mon, 30 Aug 2004 18:14:21 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <vmj7j0l2kdgu53vgpgnlb5nvo2e5cpabna@4ax.com> References: <4130d6c2@newsgroups.borland.com> <4505j0d7fmr3dbl9fpabplhbpvv0gg50i5@4ax.com> <4133585a@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.34.99.183 X-Trace: newsgroups.borland.com 1093914857 69.34.99.183 (30 Aug 2004 18:14:17 -0700) Lines: 36 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail