Thread View: cn.bbs.comp.program
1 messages
1 total messages
Started by ëͷ
Wed, 05 Aug 1998 00:00
Re: ��ζ���һ��ȫ�ֱ�����(¥������
Author: ëͷ
Date: Wed, 05 Aug 1998 00:00
Date: Wed, 05 Aug 1998 00:00
43 lines
2497 bytes
2497 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)
{
Label1->Caption=MainProgramPath;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//Child.cpp
//---------------------------------------------------------------------------
extern AnsiString MainProgramPath;
//---------------------------------------------------------------------------
__fastcall TChildForm::Button1Click(TObject *Sender)
{
Label1->Caption=MainProgramPath;
}
//---------------------------------------------------------------------------
--
[1;36m ��Դ: ����������BBSվ��bbs.nease.net�E[FROM: www-post@bbs.nease.n]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads