锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久精品女人天堂AV麻,久久久精品久久久久久,久久精品男人影院http://www.shnenglu.com/einz/category/9162.htmlzh-cnFri, 17 Jul 2009 22:44:36 GMTFri, 17 Jul 2009 22:44:36 GMT60OnClosehttp://www.shnenglu.com/einz/articles/71351.htmlEiNEiNTue, 06 Jan 2009 08:26:00 GMThttp://www.shnenglu.com/einz/articles/71351.htmlhttp://www.shnenglu.com/einz/comments/71351.htmlhttp://www.shnenglu.com/einz/articles/71351.html#Feedback0http://www.shnenglu.com/einz/comments/commentRss/71351.htmlhttp://www.shnenglu.com/einz/services/trackbacks/71351.html
enum TCloseAction { caNone, caHide, caFree, caMinimize };
typedef void __fastcall (__closure *TCloseEvent)(System::TObject* Sender, TCloseAction &Action);
__property TCloseEvent OnClose = {read=FOnClose, write=FOnClose, stored=IsForm};

Description

Use OnClose to perform special processing when the form closes. The OnClose event specifies which event handler to call when a form is about to close. The handler specified by OnClose might, for example, test to make sure all fields in a data-entry form have valid contents before allowing the form to close.

A form is closed by the Close method or when the user chooses Close from the form's system menu.

The TCloseEvent type points to a method that handles the closing of a form. The value of the Action parameter determines if the form actually closes. These are the possible values of Action:

Value    Meaning

caNone    The form is not allowed to close, so nothing happens.
caHide    The form is not closed, but just hidden. Your application can still access a hidden form.
caFree    The form is closed and all allocated memory for the form is freed.
caMinimize    The form is minimized, rather than closed. This is the default action for MDI child forms.

If a form is an MDI child form, and its BorderIcons property is biMinimize, then the default Action is caMinimize. If a MDI child form does not have these settings, the default Action is caNone, meaning that nothing happens when the user attempts to close the form.

If a form is an SDI child form, Action defaults to caHide.

To close the form and free it in an OnClose event, set Action to caFree.

Note:    When the application shuts down, the main form receives an OnClose event, but any child forms do not receive the OnClose event.


EiN 2009-01-06 16:26 鍙戣〃璇勮
]]>
灝忚鏋勪歡http://www.shnenglu.com/einz/articles/71034.htmlEiNEiNFri, 02 Jan 2009 14:21:00 GMThttp://www.shnenglu.com/einz/articles/71034.htmlhttp://www.shnenglu.com/einz/comments/71034.htmlhttp://www.shnenglu.com/einz/articles/71034.html#Feedback0http://www.shnenglu.com/einz/comments/commentRss/71034.htmlhttp://www.shnenglu.com/einz/services/trackbacks/71034.html鎽樿嚜BCB鐨勪緥瀛?瓚婄湅瓚婃湁鐐硅糠緋?榪樿秺瑙夊緱niubility.鍍忚瀵熻呭張鑲畾涓嶆槸,瀹炲湪鏄墰...

Main.cpp:

//----------------------------------------------------------------------------
//Borland C++Builder
//Copyright (c) 1987, 1998-2002 Borland International Inc. All Rights Reserved.
//----------------------------------------------------------------------------
//-------------------------------------------------------------------------
//    minicomp.cpp - uses the TCounter example component
//-------------------------------------------------------------------------
#include "minicomp.h"
#include 
<stdio.h>
#include 
<stdlib.h>
#include 
<condefs.h>
//-------------------------------------------------------------------------
USEUNIT("counter.cpp");
//---------------------------------------------------------------------------
main()
{
  TExample example;

  
return 0;
}
//-------------------------------------------------------------------------
TExample::TExample()
{
  TCounter Counter(
7);
  
int i;
  
//鎶婃帶浠禖ounter鐨勬帴鍙Multiple鍜屽閮ㄥ疄鐜癕ultipleReached榪炴帴涓?/span>
  Counter.OnMultiple = MultipleReached;

  
for (i=0; i < 100; i++)
    Counter.Increment();
}
//-------------------------------------------------------------------------
void TExample::MultipleReached(TCounter *Sender)
{
  printf(
"Multiple=%d reached with val=%d\n", Sender->Multiple, Sender->Val);
}
//-------------------------------------------------------------------------

minicomp.h:

//-------------------------------------------------------------------------
//    minicomp.h - uses the TCounter example component
//-------------------------------------------------------------------------
#include "counter.h"
//-------------------------------------------------------------------------
class TExample
{
private:
  
void MultipleReached(TCounter *Sender);
public:
  TExample();
};
//-------------------------------------------------------------------------

counter.h:

//-------------------------------------------------------------------------
//    counter.h. - example of a small, non-visual counter component
//-------------------------------------------------------------------------
class TCounter;         // forward

typedef 
void (__closure *TCounterEvent)(TCounter *Sender);
//-------------------------------------------------------------------------
class TCounter 
{
private:
  TCounterEvent FOnMultiple; 
//榪欏氨鏄釜鍑芥暟鎺ュ彛
  int FVal;
  
int FMultiple;
public:
  __property 
int Val = {read=FVal, write=FVal};
  __property 
int Multiple = {read=FMultiple};
  __property TCounterEvent OnMultiple 
= {read=FOnMultiple, write=FOnMultiple};
  
void Clear();
  
void Increment();
  TCounter(
int Multiple);
};
//-------------------------------------------------------------------------

counter.cpp:

//-------------------------------------------------------------------------
//    counter.cpp - example of a small, non-visual counter component
//-------------------------------------------------------------------------
#include "counter.h"
//-------------------------------------------------------------------------
TCounter::TCounter(int Multiple)
{
  FMultiple 
= Multiple;
}
//-------------------------------------------------------------------------
void TCounter::Clear()
{
  FVal 
= 0;
}
//-------------------------------------------------------------------------
void TCounter::Increment()
{
  
//榪欏彞鎵ц鏃墮兘鏄閮ㄦ潵璋冪敤鐨?姝ゆ椂OnMultiple宸茬粡鍜屽闈㈤偅涓嚱鏁版帴鍙h繛鎺ヤ笂浜?br>  //涔熷氨鏄皟鐢ㄧ殑鍏跺疄鏄闈㈣繘鏉ョ殑閭d釜鍑芥暟,鎶妕his浼犲嚭鍘?璁╁閮ㄩ偅涓嚱鏁版搷浣?br>  //TExample::MultipleReached(this)
  if (((++FVal) % FMultiple) == 0)
      OnMultiple(
this);
}
//-------------------------------------------------------------------------



EiN 2009-01-02 22:21 鍙戣〃璇勮
]]>
New Applicationhttp://www.shnenglu.com/einz/articles/70885.htmlEiNEiNWed, 31 Dec 2008 15:10:00 GMThttp://www.shnenglu.com/einz/articles/70885.htmlhttp://www.shnenglu.com/einz/comments/70885.htmlhttp://www.shnenglu.com/einz/articles/70885.html#Feedback0http://www.shnenglu.com/einz/comments/commentRss/70885.htmlhttp://www.shnenglu.com/einz/services/trackbacks/70885.htmlProject1.cpp:

//---------------------------------------------------------------------------

#include 
<vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USEFORM("Unit1.cpp", Form1); //璋冪敤榪欎釜vcl妯″潡,璇﹁Unit1.cpp
//---------------------------------------------------------------------------
//榪欓噷寰堟悶絎?娌$粰鍙傛暟鍚嶉噸鍐?涓嶇煡閬撹繖鏍峰嚱鏁伴噷闈㈣兘涓嶈兘鐢ㄥ埌榪欏嚑涓弬鏁?img src="http://www.shnenglu.com/Images/dot.gif">
//涓嶈繃濂藉儚涔熷氨娌$敤
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
    
try
    {
         Application
->Initialize();
         
//The owner of the new form is the Application object
         
//__classid榪斿洖涓涓寚鍚慣Form1鐨剉table鐨勬寚閽?榪欑偣榪樿鍐嶇湅鐪嬪疄鐜拌繃紼?/span>
         Application->CreateForm(__classid(TForm1), &Form1);
         Application
->Run();
    }
    
catch (Exception &exception)
    {
         Application
->ShowException(&exception);
    }
    
catch ()
    {
         
try
         {
             
throw Exception("");
         }
         
catch (Exception &exception)
         {
             Application
->ShowException(&exception);
         }
    }
    
return 0;
}
//---------------------------------------------------------------------------


Unit1.h:

//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
//閮藉彧鏄簺澹版槑閮ㄥ垎,鎵浠ュ寘鍚湪澶存枃浠墮噷闈?/span>
#include <Classes.hpp> //TPersistent, TComponent
#include <Controls.hpp> //TControl, TWinControl
#include <StdCtrls.hpp> //TButton
#include <Forms.hpp> //TApplication, TForm
//---------------------------------------------------------------------------
/*

TObject(RTTI,鍨冨溇鍥炴敹絳夋渶鍩烘湰鐨?
    |
    |--TList(stores an array of pointers)
    |
    |--TStream(read and write to some media)
    |   |
    |   |--TFileStream,TStringStream,TWinSocketStrem
    |
    |--TFiler(璇誨啓鎺т歡[objects]灞炴?姣斿淇濆瓨dfm鏂囦歡淇℃伅,鍦ㄥ唴瀛樹腑鏆傚瓨鎺т歡淇℃伅絳?
    |   |
    |   |--TReader
    |   |--TWriter(鍏蜂綋瀹炵幇Filer鍔熻兘)
    |
    |--TPersistent(have assignment and streaming capabilities)
        |
        |--TStrings(for objects that represent a list of strings)
        |   |
        |   |--TStringList(鍏蜂綋瀹炵幇)
        |
        |--TComponent(鎺т歡鐖剁被,鍖呮嫭鍙樉紺哄拰涓嶅彲鏄劇ず)
            |
            |--TApplication(鎶借薄WindowsGUI鐜,娑堟伅鏈哄埗褰撶劧榪樻湁閽堝web鐨勭幆澧?
            |
            |--TControl(鍙鎺т歡)
                |
                |--TWinControl(閽堝Windows鐨勫彲瑙嗘帶浠?
                    |
                    |--TButtonControl(Button鐨勬娊璞?
                    |   |
                    |   |--TButton(Button鐨勫叿浣撳疄鐜?
                    |
                    |--TScrollingWinControl(鏀寔婊氬姩鏉$殑Windows鎺т歡)
                        |
                        |--TCustomForm
                            |
                            |--TForm
*/
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:    
// IDE-managed Components
private:    // User declarations
public:        // User declarations
    __fastcall TForm1(TComponent* Owner); //Owner鏄垱閫犺?Parent鏄憟鐜拌?鍙浜庡彲瑙嗘帶浠?
};
//---------------------------------------------------------------------------
/*

鎶婅繖涓獀cl(Form1)瀵煎嚭,鍏朵粬妯″潡浣跨敤榪欎釜澶存枃浠舵椂灝卞憡璇夌紪璇戝櫒,榪欎釜vcl鍦ㄥ埆澶勫叿浣撳畾涔?br>
*/
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
 

Unit1.cpp:

//---------------------------------------------------------------------------

#include 
<vcl.h>
#pragma hdrstop 
//涔嬪墠鐨勫ご鏂囦歡鍙互浣跨敤澶存枃浠剁紦瀛樻妧鏈?鍏朵粬鍖呭惈vcl.h鐨勭紪璇戝潡灝辯紪璇戜竴嬈?/span>

#include 
"Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource 
"*.dfm"
/*
榪欓噷鐨勭枒闂湪浜?澶存枃浠墮噷闈㈠凡緇忔湁涓涓猠xtern鐨勬寚閽?榪欓噷涓轟綍榪樿鍐嶆鎼炲嚭涓寚閽?
娉ㄦ剰鍦≒roject1.cpp閲岄潰鏈変釜USEFORM鐨勫畯,榪欎釜瀹忕殑鍏蜂綋瀹氫箟鍦╲cl\sysclass.h鏂囦歡涓?br>濡備笅:

#ifdef BCBVER1
  #define USEFORM(FileName, FormName) \
    class DELPHICLASS T##FormName;       \
    extern T##FormName *FormName;
#else
  #define USEFORM(FileName, FormName) \
    class DELPHICLASS T##FormName;       \
    extern PACKAGE T##FormName *FormName;
#endif

鍙互鐪嬪嚭榪欓噷FileName鏍規湰娌$敤涓?鎵浠?鏃㈢劧緇欎簡cpp涔熷氨緇欎簡.h涔熷氨緇欎簡閭d釜extern鎸囬拡"
鐨勬兂娉曟槸閿欒鐨?cpp鏂囦歡鏍規湰灝辨病鏈夎搗鍒頒換浣曚綔鐢?榪樻槸瀹屽叏渚濊禆榪炴帴鏃墮潬extern鐨勫瓨鍌?br>灞炴у湪obj閲岄潰鍘繪壘.榪欎篃灝辨槸涓轟粈涔坈pp閲岄潰濡傛灉娌℃湁涓嬮潰榪欎釜鎸囬拡澹版槑,鎶ラ敊鐨勪笉鏄疷nit1
鑰屾槸Project1,鍥犱負鏄湪Project1璋冪敤浜嗚繖涔堜釜娌℃湁瀹氫箟涓寚閽?榪樻湁涓鐐瑰氨鏄?涔嬫墍浠ヤ細榪?br>鏍鋒槸鍥犱負.h鏄笉浼氱紪璇戠殑,Project1鍦║nit1.cpp瀵瑰簲鐨刼bj閲岄潰鍘繪壘,褰撶劧鎵句笉鍒?鎵浠ヨ繖閲?br>蹇呴』瑕佸啀嬈″啓涓婁竴鍙?
*/
TForm1 
*Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
 


EiN 2008-12-31 23:10 鍙戣〃璇勮
]]>
亚洲AV无码久久精品蜜桃| 久久99精品久久久久久| 亚洲欧洲精品成人久久曰影片| 怡红院日本一道日本久久| 99久久精品国产综合一区| 欧美久久久久久午夜精品| 久久久国产精华液| 精品久久综合1区2区3区激情| 亚洲人AV永久一区二区三区久久 | 久久国产AVJUST麻豆| 中文字幕久久亚洲一区| 蜜臀久久99精品久久久久久小说| 国产69精品久久久久99| 伊人久久大香线焦AV综合影院 | 成人精品一区二区久久久| 欧美黑人激情性久久| 久久久久久久97| 性做久久久久久久| 久久精品视屏| 九九久久精品无码专区| 新狼窝色AV性久久久久久| 日韩亚洲国产综合久久久| 久久―日本道色综合久久| 久久亚洲精品中文字幕| 中文字幕精品无码久久久久久3D日动漫 | 日日噜噜夜夜狠狠久久丁香五月| 久久国产福利免费| 亚洲精品高清国产一久久| 久久精品国产亚洲网站| 精品国产乱码久久久久久1区2区| 亚洲∧v久久久无码精品| 综合久久精品色| 2019久久久高清456| 怡红院日本一道日本久久| 久久国产精品二国产精品| 久久国产美女免费观看精品 | 国产综合精品久久亚洲| 91麻豆精品国产91久久久久久| 亚洲精品高清久久| 国产免费久久久久久无码| 精品国产一区二区三区久久蜜臀|