Saturday, October 23, 2010

Secret to create components


1. To create component class declaration
class PACKAGE new class name: public ancestor class name
(
private:
Private data: (1) internal private use (2) release the real data retention properties (3) release event data retention
(1,2,3) private data generally in the constructor initialization, (3) the general initialization of the event associated with the ancestors.
Usually call the ancestor method to facilitate the direct ancestor of the type often with variable preservation: typedef ancestor class name Inherit;
Private methods: internal use only in the class definition, do not want to be successor to use, does not want the public to use. (Try to write generic functions)
protected:
Protection of data: it seldom used.
Protection method: virtual function normally. Internal use in the class definition, the object can not be directly invoked, and whether or not control of the public to its derived class
The derived class can redefine the method, and may be open.
public:
Public data: general properties, but not released (ie the design phase can not operate) property is not real data
Private data needed to save the property, operating property through the method. Commonly defined as:
Mode 1: __property AnsiString ItemData = (read = FItemData, write = FItemData, default = "A");
Mode 2: __property AnsiString ItemData = (read = GetItemData, write = SetItemData, default = "A");
FItemData save their data private office, GetItemData (), SetItemData () is the realization of read-write
Function, in addition to its internal data, can also be added to set the appropriate handling code, this part of the deal is an
Of greatest strength. That is achieved by directly modifying properties of both reading and writing of data can achieve the code office
Management, but users are only made sense if the data changes, it is this "side effect" brought about.
Also, if the changes to the property does not need to respond to treatment only with the definition of mode 1 on the line.
Public methods: implementation class package, change the data members of the public functions through. (Method)
Re-defined functions are usually the first call the ancestor class of the method Inherit:: XXX (); (Inherit have stated, XXX table function name),
And then write their own code to make the deal.

__published:
Post properties: with the public part of the property, except that the release properties in the design phase can be observed directly through the object to modify.
Published property ancestor class, it is best to confirm this. In passing that the method statement should not be written in the Office
Properties can also be written in public or private, but they are not in the design of access, private property only in
Internal use are not available to users. Writing component should be as much as possible with property, rather than utilizing method. Not only property
Only the work done by the method to complete.

Post event:
1. Ordinary event: the only parameter only TObject * Sender, general use TNotifyEvent (pointer type)
Such as: __property TNotifyEvent nExit = (read = FnExit, write = FnExit);
As with the attributes necessary to save the event private data pointer. TNotifyEvent FnExit;
Another is the event handling code. void __fastcall MynExit (System:: TObject * Sender)
Its implementation in the code from the FnExit (Sender) statement trigger event; (Note that the event handler return value void)
2. Special events:
First: the definition of event types require pointers (similar to the definition of function pointers)
typedef void __fastcall (__closure * TKeyDownEvent) (System:: TObject * Sender,
WORD & Key, TShiftState Shift);
Second: to have the data depository. Private office in a statement: If TKeyDownEvent FnKeyDown;
Re: have the corresponding event handler is generally protected Department statement. As
protected:
virtual void __fastcall MynKeyDown (System:: TObject * Sender, WORD & Key,
TShiftState Shift); code often FnKeyDown (Sender, Key, Shift)
Finally: Set connection (need to provide the first three: Event pointer type, data repository variable, the event handler).
__property TKeyDownEvent nKeyDown = (read = FnKeyDown, write = FnKeyDown);

);

2. Component Inspection and Registration
static inline void ValidCtrCheck (new class name *)
(
new new class name (NULL);
)
Ensure that the control statement, there is no pure virtual functions, virtual base class for instance can not be generated.

namespace namespace
(
void __fastcall PACKAGE Register ()
(
TComponentClass classes [1] = (__classid (the new class name));
RegisterComponents ("their package name", classes, 0);
/ / Add property editors also note RegisterPropertyEditor (...)
)
)
Name space is a C + + features, use this Register () function can distinguish the other controls. This name must conform to specifications,
With the control file name where relevant. If TMyButton in mybutton.cpp in this namespace are Mybutton. With
New Component dialog box to generate new components, without considering the issue.






Recommended links:



DivX To IPod



Copper plate etching to create text in Photoshop



Create a simple Window



CLEAR links in the production of hidden "oil tiger"



Five operators commitment to cancel the contract monthly fee Controversy pending Overlord



DivX to Zune



Dreamweaver MX 2004 from scratch (7)



wlanapi dll MISSING error beware amp repair



Easy to use Telnet Servers



New System Utilities



SARFT issued the first batch of 3G Licenses audio-visual



3GP to MPEG



Liang Dong, vice president of Baidu's RESIGNATION



CorelDRAW based cartoon series (1)



Easy-speed Run 47 Hours To Restore The Secret



Thursday, October 7, 2010

Dell's green innovation-up plastic bag recycling to say "no"



May 29 message, in order to meet the June 5 World Environment Day, the arrival of Dell will be May 31 at 10 am to 5 pm in Xiamen Taisho Electronic City, Dell experience the shop door, the June 1 AM 10 am to 2 pm in Xiamen City, Dell, big is e-shop outside the door and experience the e-City Plaza Xiamen bainaohui the theme "Green Innovation Dell Campaign" environmental charity.

In the event, Dell's young volunteers will publicize the cancellation of free plastic bags and Dell recycling program, will answer questions the way the public understand the cancellation of one-time plastic bags and recycling services for Dell free environment, and delivery can be recycling of non-woven bags and other small gifts.

The public can be discarded home Dell branded desktops, notebooks, printers, monitors, computer parts and other computer peripheral products on May 31 and June 1 sent to the event, Dell will be free of these waste products recycling, using environmentally centrally, and in the afternoon of June 1 of the people involved in computer recycling to conduct lottery activities to encourage people to make a contribution to environmental protection. For more information you can contact the hotline at 800-858-2571. Or click on the link China, Hong Kong joined the Dell green action against Dell branded products have been eliminated for individuals to provide free recycling services to door.

During the event, Dell will be organized about 200 volunteers to support the above activities, with the field will be set up display boards to promote this year's Environment Day "Green Olympics and Environment-friendly society" theme, with the public interactive quiz games, practicing all-round support for environmental protection.







Recommended links:



"Personal efficiency" and "organizational EFFICIENCY"



Transport Stream converter



Comment Genealogy



I have a A4 paper give you a high performance [1]



we2.0 will not reform his own life?



Special steps: maneuvers, decisive miles



sysctl Command



Beiliu Create A "digital Farmer" Training Of New Farmers



SSL WORKS



Premier Trace And Ping Tools



DAT To 3GP



Directory Cartoons - Screen Savers



BACKUP software acronis true image server for use



ASF to MOV



Good Web Development