Article View: cn.bbs.comp.program
Article #292Re: ��BCB�У���ζ���һ��ȫ�ֱ�����
From: ëͷ
Date: Wed, 05 Aug 1998 00:00
Date: Wed, 05 Aug 1998 00:00
45 lines
2521 bytes
2521 bytes
�� �� rayman (rayman) �Ĵ������ᵽ: ��
: �� �� DYQ (̫��) �Ĵ������ᵽ: ��
: : ���ʣ���BCB����ζ���һ��ȫ�ֱ������Ա� �ڸ����?�о����ʹ�ã�
: : �����ĸ����ֶ���ģ�������ã�
: : ��û��������ߣ���̸�λ��л��
: ....
: �ͱ�C/C++��ȫ�ֶ���һ��, ֻ����ÿ���õ����ļ��ォ.h�ļ�include��ȥ.
rayman ��˵������ȫ�ֱ���Ӧ��extern���塣�������£�
��ʱ��MainForm��ChildForm�е�Label1->Caption��ʾ�Ķ���ͬһ���ַ�
//Main.cpp
//---------------------------------------------------------------------------
AnsiString MainProgramPath;
//---------------------------------------------------------------------------
__fastcall TMainForm::TMainForm(TComponent* Owner)
: TForm(Owner)
{
MainProgramPath=ExtractFilePath(Application->ExeName);
}
//---------------------------------------------------------------------------
__fastcall TMainForm::Button1Click(TObject *Sender)
: TForm(Owner)
{
Label1->Caption=MainProgramPath;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//Child.cpp
//---------------------------------------------------------------------------
extern AnsiString MainProgramPath;
//---------------------------------------------------------------------------
__fastcall TChildForm::Button1Click(TObject *Sender)
: TForm(Owner)
{
Label1->Caption=MainProgramPath;
}
//---------------------------------------------------------------------------
--
[1;36m ��Դ: ����������BBSվ��bbs.nease.net�E[FROM: www-post@bbs.nease.n]
Technical Details
Message-ID:
<3PkgMW$SD1@bbs.nease.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: fc86e,3c900aa46d6d9468 X-Google-Attributes: gidfc86e,public From: maotou.bbs@bbs.nease.net (ëͷ) Subject: Re: ��BCB�У���ζ���һ��ȫ�ֱ����� Date: 1998/08/05 Message-ID: <3PkgMW$SD1@bbs.nease.net> X-Deja-AN: 378458630 X-Filename: Program/M.902307392.A X-Complaints-To: usenet@news.nease.net X-Trace: news.nease.net 902367913 17077 202.96.152.195 (6 Aug 1998 01:45:13 GMT) Organization: Net Ease NNTP-Posting-Date: 6 Aug 1998 01:45:13 GMT Newsgroups: cn.bbs.comp.program,