.

Протоколы и стандарты объектно-ориентированного программирования

Язык: русский
Формат: реферат
Тип документа: Word Doc
0 1423
Скачать документ

OLE

DDE

Clipboard

?AOA?AO

ii aeenoeeieeia “Oai?ey i?iaeoe?iaaiey o?aineyoi?ia”

ia oaio I?ioieieu e noaiaea?ou iauaeoii-i?eaioe?iaaiiiai
i?ia?aiie?iaaiey

Auiieiai nooaeaioii a?oiiu AI-1-91 Ianetheiaui A.I.

NIAeA?AEAIEA

I?aaeeneiaea

MS Windows e iiaue iaoiae ?ac?aaioee i?ia?aii

Aeeiaie/aneee iaiai aeaiiuie

OLE-oaoiieiaey

Caeeth/aiea

Nienie eeoa?aoo?u

I?eeiaeaiea 1.I?eia? eniieueciaaiey OLE-oaoiieiaee

I?aaeeneiaea

Iaeaieaa ?ani?ino?aiaiiui ycueii i?ia?aiie?iaaiey iineaaeia-

ai aeanyoeeaoey aaconeiaii yaeyaony N. Yoiio niinianoaiaaee oaeea

aai iniaaiiinoe, eae eaeiie/iinoue, iiuiinoue, aeaeinoue, ii-

aeeueiinoue. Aianoa n oai, no?aieoaeueiia oneiaeiaiea i?eeiaeaiee, aeey

?aaeecaoeee eioi?uo i?eiaiythony o?aaeeoeeiiiua i?ioeaaeo?ii-i?eaioe?i-

aaiiiua ycuee i?ia?aiie?iaaiey e, a /anoiinoe N, canoaaeytho aiai-

?eoue ia ii?aaeaeaiiii e?ecena a eo eniieueciaaiee, naycaiiii i?aae-

aea anaai n iaaeinoaoi/iie iaaeaaeiinoueth e au?aceoaeueiie
niiniaiinoueth.

Iiaeiaiuo iaaeinoaoeia ai iiiaii eeoaiu ycuee iauaeoii-i?eai-

oe?iaaiiai i?ia?aiie?iaaiey (III), a niiiaa eioi?uoeaaeeo eaeay ii-

aeaee?iaaiey iauaeoia iin?aaenoaii ea?a?oe/anee naycaiiuo eeannia.

Ioaeaeueii acyoue eeann ?anniao?eaaaony eae niaaeoiiinoue iiiaeanoaa

aeaiiuo e iia?aoeee iaae ieie, i?e/ai aeinooi e yeaiaioai aeaiiuo

eeanna aiciiaeai oieueei iin?aaenoaii iia?aoeee yoiai eeanna. Onoa-

iiaeaiea /aoeie acaeiicaaeneiinoe iaaeaeo aeaiiuie e iia?aoeeyie aa-

aeao e aieueoie oeaeinoiinoe aeaiiuo e cia/eoaeueii iiauoaao iaaeaae-

iinoue i?ia?aii ii n?aaiaieth n o?aaeeoeeiiiuie ycueaie i?ia?aiie?i-

aaiey. E?iia oiai, eaeay i?ia?aiie?iaaiey n iiiiuueth eeannia ai

iiiaii eniieuecoao oio aea iiaeoiae, eioi?ue iicaieyao ethaeyi oi?ie?i-

aaoue iiaeaee iauaeoia ?aaeueiiai ie?a.

Aia?aua eaeae III auee ?aaeeciaaiu a na?aaeeia 60-o aiaeia a

ycuea i?ia?aiie?iaaiey Neioea-67. Iineaaeiee, iaeiaei, ia iaoae a

oi a?aiy oe?ieiai ?ani?ino?aiaiey eae a neeo naiae ioiineoaeueii

iaiueoae i?iecaiaeeoaeueiinoe ii n?aaiaieth n o?aaeeoeeiiiuie ycueaie

oeia FORTRAN, ALGOL, PL/1 oae e, aiciiaeii, iaaaeaeaaoiinoe i?aaeea-

aaaiuo n?aaenoa ?aoaaiui a oi a?aiy caaea/e. Aua iaeiei aaaeiui ia?a-

ie/aieai aeey ?ani?ino?aiaey Neioeu-67 noaee o?oaeiinoe, n eioi?u-

ie i?eoeinue noieeiooueny aieueoeinoao i?ia?aiienoia i?e aai eco/a-

iee. Aeaei a oii, /oi ia?yaeo n oeaeui ?yaeii aaconeiaiuo aeinoieinoa,

eaeae III iaeaaeatho e iaeiei nouanoaaiiui iaaeinoaoeii – iie aeaeaei

ia i?inou aeey iiieiaiey e iniaaiii aeey inaiaiey n oeaeueth i?aeoe-

/aneiai eniieueciaaiey.

N++ – ?acaeoea N.

N++ – yoi iauaeoii-i?eaioe?iaaiuue ycue, oi anoue ycue, iic-

aieythuee i?ia?aiienoo iia?e?iaaoue iauaeoaie iaeioi?uo oeiia,

i?aaeaa?eoaeueii ei ii?aaeaeaiiui. Iacaaiea ycuea “N++” io?aaeaao

yaiethoeeiiiue oa?aeoa? eciaiaiey ycuea N (caienue “++”, a ycuea N,

icia/aao, /oi e eaeie-oi ia?aiaiiie i?eaaaeyaony aaeeieoea). Ii

eiaao aua aieaa iiuiua e aeaeea n?aaenoaa aeey iaienaiey yooaeoea-

iuo i?ia?aii, /ai N, io eioi?iai ii i?iecioae. *aeiaae, i?ia?ai-

ie?othuee ia o?aaeeoeeiiiuo ycueao, iiaeao i?inoi iioa?youe aieiao io

oao aiciiaeiinoae, eioi?ua i?aaeinoaaeyao N++.

Ii ia iaiaa aaaeiui yaeyaony oi, /oi oaeie ?ani?ino?aiaiiue e

oieaa?naeueiue ycue, eae N, nio?aiai a ea/anoaa iniiau. N i?ino,

yooaeoeaai, ia?aiinei. *aai oieueei iao a ycuea N: no?ieiauo aeai-

iuoiao, iao?eoe iao, n?aaenoa ia?aeeaeueiiai i?ia?aiie?iaaiey oiaea

iao. Iao aeaaea aaiaea-auaiaea.

Oeiu, iia?aoeee e iia?aoi?u N i/aiue aeecee e oiio, n /ai iu

eiaai aeaei a Annaiaea?a,- /enea, aae?ana, a?eoiaoe/aneea e eiae-

/aneea aeaenoaey, oeeeeu… E?iia oiai, iiiaea iniaaiiinoe N iaae-

aoniuneaiii iaiaeath eiiieeyoi?o, eae nie?aoeoue eiae e a?aiy eniie-

iaiey i?ia?aiiu. Yoe oa?aeoa?iua /a?ou ycuea N iicaieytho iaie-

naoue yooaeoeaii ?aaioathuee e ia neeoeii neiaeiue eiiieeyoi?. E oi-

oy a iaoeiiuo eiaeao ia ?aciuo eiiiuethoa?ao yeaiaioa?iua iia?aoeee

iaicia/athon ii-?aciiio, a?yae ee ?ac?aaio/eeo eiiieeyoi?a i?eaeao a

aieiao eioa?i?aoe?iaaoue i?inoaeoea au?aaeaiey eaeei-ieaoaeue i?eae-

iaeueiui niiniaii. Eiaiii iiyoiio ycue N “eaeao aacaea e ia anai”,

i?ia?aiiu, iaienaiiua ia iai, ?aaioatho yooaeoeaii, e eo iiaeii ia-

?aiineoue n iaeiiai eiiiuethoa?a ia ae?oaie.

Aieueoeinoai ycueia i?ia?aiie?iaaiey nicaeaiu aeey ?aoaiey ii-

?aaeaeaiiiai e?oaa caaea/. A ieo ia oieueei ia oaaoaao ii?aaeaeaiiuo

oeiia aeaiiuo e ooieoeee, ii e iiiai eeoiaai n oi/ee c?aiey /aeiaa-

ea, aeaeaeiai io iaeanoe, ia eioi?oth i?eaioe?iaai ycue. Niaoeeaee-

ce?iaaiiua oeiu aeaiiuo eee iia?aoi?u, o?aaothuea iao?eaeaeueiie

iiaeaea?aeee, cao?oaeiytho eco/aiea ycuea e iaoatho aaoae ?aaioa, anee

au eie ia niae?aaoanue iieueciaaoueny. Iiyoiio N, a eioi?ii iao ie-

/aai eeoiaai, iiioey?ai n?aaee oe?ieiai e?oaa i?ia?aiienoia. Niio-

aaonoaothuea aeaeeioaee iiaoo aeiaaaeoue e n?aaenoaai ycuea niaoeeaee-

ce?iaaiiua ooieoeee aeey ?aaiou ni no?ieaie, oaeeaie, nieneaie, on-

o?ienoaaie aaiaea-auaiaea, iaoaiaoe/aneeie iauaeoaie e o.ae. Inoaao-

ny oieueei aua?aoue oi, /oi ioaeii ee/ii aai. Caaieiai/iua oaeeu ia-

eaa/atho eniieueciaaiea aeaeeioae, i?aaeinoaaeytho iieaciua oeiu aeai-

iuo, aeiaaeueiua ia?aiaiiua, iae?iii?aaeaeaiey… Iie ai iiiaii on-

o?aiytho i?ioeai?a/ea iaaeaeo yooaeoeaiinoueth i?ia?aiiu e oaeianoaii

eniieueciaaiey aeaeeioa/iuo ooieoeee. Iie oaeaea iicaieytho ia iiaoi-

?yony e ia ienaoue ii ianeieueeo ?ac iaeii e oiaea a ?acee/iuo i?ia-

?aiiao. Iineieueeo N aue nicaeai niaoeeaeueii aeey nenoaiiiai i?ia?ai-

ie?iaaiey, ii eiaao aiciiaeiinoe ieceiai o?iaiy, iicaieythuea “ea-

?aoue aac i?aaee”. A caaeneiinoe io ono?ienoaa e iia?aoeeiiiie nen-

oaiu aaoae iaoeiu au iiaeaoa “aeacoue” a aeaeaiiaiyoue eee eniieueci-

aaoue nenoaiiua i?ia?aiiu, iaoiaeyueany a iia?aoeaiie iaiyoe.

A ethaii neo/aa au iiaeaoa ?anniao?eaaoue eiae nianoaaiiie i?ia-

?aiiu eae aeaiiua, a iannea aeaiiuo eae eiae ooieoeee, eaaae?aoioth

iao?eoeo eae aaeoi?, a oaeno eae aeia?iia aea?aai. *oi au ie iaoi-

aeeeinue a iaiyoe – yoi anaai eeoue iineaaeiaaoaeueiay oeaii/ea /enae.

Anee au ia aieoanue ?enea – iiaeaoa aeaeaoue ana, /oi aai acaeoiaaony.

Nia?aiaiiua i?a?aiienou auae?atho N ia oieueei ec-ca aai i?ae-

iouanoa. A ianoiyuaa a?aiy iu eiaai aeaei n oeaiiie ?aaeoeeae: /ai

aieueoa iaienaii ia N, oai aieueoa ia iai iaieooo aua. Yoi iaeia ec

i?e/ei, ii/aio ycue N++ nio?aiyao N a ea/anoaa iiaeiiiaeanoaa.

Ii iiaieth aaoi?a N++, Auea?ia No?aono?oia, ?acee/ea iaaeaeo

eaeaieiaeae N e N++ caeeth/aaony i?eia?ii a neaaeothuai: i?ia?aii ia

N io?aaeaao “niinia iuoeaiey” i?ioeanni?a, a N++ – niinia iuoeaiey

i?ia?aiienoa. Ioaa/ay o?aaiaaieyi nia?aiaiiiai i?ia?aiie?iaaiey,

N++ aeaeaao aeoeaio ia ?ac?aaioea iiauo oeiia aeaiiuo, iaeaieaa iie-

ii niioaaonoaothueo eiioeaioeeyi aua?aiiie iaeanoe ciaiee e caaea/ai

i?eeiaeaiey. Ia N ieooo aeaeeioaee ooieoeee, N++ iicaieyao nicaea-

aaoue aeaeeioaee eeannia. Eeann yaeyaony eeth/aaui iiiyoeai N++.

Iienaiea eeanna niaea?aeeo iienaiea aeaiiuo, o?aaothueony aeey i?aae-

noaaeaiey iauaeoia yoiai oeia, e iaai? iia?aoeee aeey ?aaiou n ii-

aeiaiuie iauaeoaie.

A ioee/ea io o?aaeeoeeiiiuo no?oeoo? N eee Ianeaey, /eaiaie

eeanna yaeythony ia oieueei aeaiiua, ii e ooieoeee. Ooieoeee-/eaiu

eeanna eiatho i?eaeeaae?iaaiiue aeinooi e aeaiiui aioo?e iauaeoia

yoiai eeanna e iaania/eaatho eioa?oaen iaaeaeo yoeie iauaeoaie e in-

oaeueiie i?ia?aiiie. I?e aeaeueiaeoae ?aaioa niaa?oaiii ia iayca-

oaeueii iiiieoue i aioo?aiiae no?oeoo?a eeanna e iaoaaecia ?aaiou

“ano?iaiiuo ooieoeee”. A yoii niunea eeann iiaeiaai yeaeo?e/aneiio

i?eai?o – iaei eoi ciaao i aai ono?ienoaa, ii ana ciatho, eae ei

iieueciaaoueny.

*anoi a oeaeyo iiauoaiey yooaeoeaiinoe e oi?iuaiey no?oeoo?u

i?ia?aiiu i?eoiaeeony canoaaeyoue aa ?aaioaoue n ?acii?iaeiuie iauae-

oaie oae, eae anee au iie eiaee iaeei e oioaea oei. Iai?eia?, ie-

?oaeiinoue e eaaae?ao anoanoaaiii ?anniao?eaaoue eae aa?eaiou aaiiao-

?e/aneie oeao?u. Iieacii ninoaaeyoue nienee oeao?, ia?eniaaiiuo ia

ye?aia, eee ooieoeee, eioi?ua eo ?aciiiaeatho, aeaeaatho e o.ae. I oi/-

iii oeia iauaeoa i?eoiaeeony ii?ie caauaaoue. Nienie aaiiao?e/an-

eeo oeao? “ia ciaao”, /oi a iai iaoiaeeony – io?acee eee caacaei/-

ee. Ia ciaao yoiai e eiiieeyoi?. Ii ana a?aiy, iiea au ?enoaoa

yoe iauaeou, iaecaaaeii i?eoiaeeony “iiiieoue”, /oi iie ec naay

i?aaenoaaeytho. Eiia/ii, aiciiaeiinoe ieceiai o?iaiy iicaieytho “ca-

auaaoue” e “aniiieiaoue” eiaaea e eae iai caaeaai?annoaeeony, ii i?e

yoii eiiieeyoi? oa?yao eiio?ieue iaae iniuneaiiinoueth aeaenoaee.

Eniieueciaaiea i?iecaiaeiuo eeannia e ae?ooaeueiuo ooieoeee iic-

aieyao ecaaaeaoue ?eneiaaiiie oaoieee e ia caaioeony i oii, a ea-

eie oi?ia iauaeo oeia “aaiiao?e/aneay oeao?a” o?aieo eioi?iaoeeth i

oii, e?oa ii eee eaaae?ao. (E?iia aiciiaeiinoae III, nicaeaiea oe-

iia aeaiiuo “o?aoaieueiee” eee “eaaae?ao” eae i?iecaiaeiua io aaciai-

ai eeanna “aaiiao?e/aneay oeao?a” io?aaeaao eiae/aneoth naycue iiiy-

oee). Ae?ooaeueiua ooieoeee, ii nouanoao, ii?aaeaeytho, /oi eiaiii

iiaeii aeaeaoue n iauaeoii, a ia oi, eae yoi aeaeaoue. Nicaeaaay eeann

“aaiiao?e/aneay oeao?a”, iu iiaeai aeeth/eoue a iaai ae?ooaeueiua

ooieoeee ?eniaaiey, oaaee/aiey, iiai?ioa. N eniieueciaaieai yoeo

ooieoeee iiaeii nicaeaoue aua iaeei /eai eeanna.

Caoai iiaeii ?ac?aaioaoue aeaeeioaeo i?ia?aii eioa?aeoeaiie

a?aoeee, niaaaeea aa n?aaenoaaie aeeaeiai, ooieoeeyie a?iaea aeiiieia-

iey iaeioi?ie iaeanoe ye?aia iaeeiaeiauie aaiiao?e/aneeie oeao?a-

ie e o.ae. Aeaeeioa/iua ooieoeee aoaeoo aucuaaoue ooieoeee-/eaiu eean-

na “aaiiao?e/aneay oeao?a”: ?eniaaiey, aeaeaeaiey, iiai?ioa,oaaee-

/aiey. A iinea oiai, eae iu ana yoi iaieoai, ioeiiieee?oai, ni?y-

/ai oaeno ooieoeee, eioi?ua n/eoaai naiae eioaeeaeooaeueiie nia-

noaaiiinoueth, ia/eiaaony naiia eioa?aniia. Oaia?ue iu iiaeai iie-

naoue neieueei oaiaeii iiauo oeiia oeao? – iiiaioaieueieeia, caacaei-

/ae, yeeeinia – i?iecaiaeiuo io eeanna “aaiiao?e/aneay oeao?a” e

iauynieoue, eae eo ?eniaaoue, oaaee/eaaoue e iiai?a/eaaoue. Eae aeae-

aaoue – iauyniyoue ia iaaei. Yoi oaea anoue a aaciaii eeanna. Ooieoeee

iaoae aeaeeioaee iiaoo ?aaioaoue niauaeoaie aiiaue nicaeaiiuo oeiia,

aeey ieo yoi aa?eaiou aaiiao?e/anie oeao?u. Neaaeoao ioiaoeoue, /oi

a i?iecaiaeiuo eeannao iiaoo (e, eae i?aaeei, aeieaeiu) iiyaeyony

aeaiiua e ooieoeee, eioi?uo iao a aaciaii eeanna. Iaeiaei ie iaeia ec

ooieoeee, ia?aaaouaathueo “aaiiao?e/aneea oeao?u”, ieeiaaea ia oc-

iaao i niaoeeoe/aneeo naienoaao iiiaioaieueieea eee yeeeina, e?iia

oiai, /oi iie ii-naiaio ?enothony, oaaee/eaathony e iiai?a/eaathony.

I?iecaiaeiue eeann nai iiaeao auoue aaciaui aeey ae?oaeo eeannia, a

iicaeiea aa?nee N++ iicaieytho naeaeaoue iaeei eeann i?iecaiaeiui io

ianeieueeeo ae?oaeo.

I?e iaienaiee i?ia?aiiu /anoi aeiioneathony aeinaaeiua iieioiin-

oe, iaia?oaeeaathueany oieueei ia noaaeee auiieiaiey e, oau, neeoeii

iicaeii. Iai?eia?, anee ia?aiaiiay ii niuneo – ciaiaiaoaeue ae?iae,

oioaeinue au iieo/eoue niiauaiea ia ioethea oiaaea, eiaaea ae i?enaae-

aaaony iieue, a ia oiaaea, eiaaea ia yoio iieue /oi-ieaoaeue aeaeeony.

Eee, neaaeai, ooieoeey ?eniaaiey oi/ee. Iaaiciiaeii oaea?aeaoueny io

niaeacia aucaaoue aa oioy au ?ac aac i?iaa?ee auoiaea ca a?aieoeu

ye?aia. A oi aea a?aiy , anee iu ieoai i?ia?aiio ?eniaaiey eeiee,

iaycaoaeueii ioaeia ooieoeey, eioi?ay ooii noaaeo oi/eo – e eae iiae-

ii auno?aa. Nouanoaoao iiiai neooaoeee, eiaaea ooieoeee e aeaiiua

neaaeoao ?ac?aoeoue eniieueciaaoue oieueei i?eaeeaae?iaaiiui ooieoeeyi,

iaae eioi?uie aa “oi?ioi iiaeoiaee”. A N++ yoiai iiaeii aeiaeoueny,

naeaeaa “iianiua” aeaiiua e ooieoeee caueuaiiuie /eaiaie eaeiai-ie-

aoaeue eeanna. E iei eiatho aeinooi oieueei ooieoeee-/eaiu yoiai aea

eeanna, a oae aea ae?ocuey eeanna. Iai?ioea, anee aeaiiua eee ooi-

eoeee-/eaiu iauyaeaiu public, iie yaeythony iauaaeinooiiuie.

N++ i?aaeinoaaeyao a ?anii?yaeaiea i?ia?aiienoa neiaeiua oeiu

aeaiiuo. Iaeiaei ie aiia?ao eeannia, ie ia?aa?ocea iia?aoeee ia

aeeytho ia yooaeoeaiinoue. Oi, /oi eeann – yoi eeann, ecaanoii

oieueei eiiieeyoi?o. Anee ooieoeee-/eaiu eeannia iauyaeaiu inline,

ia eo aucia ia o?aaoaony a?aiy. Oaeoe/anee yoi ia ooieoeee, a iiae-

noaiiaee. Eeoue ae?ooaeueiua ooieoeee inoaaeytho ioiineoaeueii ia-

aieueoie neaae a iia?aoeaiie iaiyoe.

Ec anaai auoa neacaiiiai auoaeaao eiae/iue auaiae: N++ iaeai-

eaa oaeiaiue, oieaa?naeueiue e iaiaoiaeeiue ycue. Ii ana aea aicie-

eaao aii?in, /oi aea auei iaienaii ia yoii ycuea, eniieuecoy i?ei-

oeeiu III, /oi iiaeii auei au “iio?iaaoue” ethaiio i?ia?aiienoo eee

iieueciaaoaeth. Ioaao i/aaeaeai – yoi Microsoft Windows.

MS Windows e iiaue iaoiae ?ac?aaioee i?ia?aii.

Iaeiei ec iaeaieaa aaaeiuo iaoaieciia acaeiiaeaenoaey i?ia?aii

yaeyaony iaiai aeaiiuie. A MS Windows nouanoaoao ianeieueei niiniaia

acaeiiaeaenoaey i?eeiaeaiee:

– ii/oiaue yuee;

– aeeiaie/aneee iaiai aeaiiuie;

– ano?aeaaiea iauaeoia.

Niaoeeaeueiue ii/oiaue yuee (clipboard) Windows iicaieyao

iieueciaaoaeth ia?aiineoue eioi?iaoeeth ec iaeiiai i?eeiaeaiey a
ae?oaia,

ia caaioynue ia aa oi?iaoao e i?aaenoaaeaiee.

A ioee/ea io i?ioanneiiaeueiuo iia?aoeeiiaeueiuo iia?aoeeiiiuo

nenoai, aaea iaoaieci iaiaia aeaiiuie iaaeaeo i?ia?aiiaie aeinooiai

oieueei i?ia?aiienoo, a Windows yoi aeaeaaony i/aiue i?inoi e iaa-

eyaeii aeey iieueciaaoaey.

Iaoaieci iaiaia aeaiiuo iaaeaeo i?eeiaeaieyie – aeeciaiii aaaeiia

naienoai iiiaicaaea/iie n?aaeu. E a ianoiyuaa a?aiy i?iecaiaeeoaee

i?ia?aiiiiai iaania/aiey i?eoee oaea e auaiaeo, /oi aeey ia?aiina

aeaiiuo ec iaeiiai i?eeiaeaiey a ae?oaia ii/oiaiai yueea oaea iaaeinoa-

oi/ii. Iiyaeeny iiaue, aieaa oieaa?naeueiue iaoaieci – OLE (

Object Linking and Embedding )

– Ano?iaiiay iauaeoiay naycue, eioi?ue iicaieyao ia-

?aiineoue ec iaeiiai i?eeiaeaiey a ae?oaia ?acii?iaeiua aeaiiua. Iai?e-

ia?, n iiiiuueth yoiai iaoaiecia aeaiiua, iiaeaioiaeaiiua a nenoaia

naoaaiai ieaie?iaaiey Time Line for Windows ( Symantec ), iiaeii

ia?aiineoue a oaenoiaue i?ioeanni? Just Write ( Symantec ), a ca-

oai, neaaeai, a aaia?aoi? i?eeiaeaiee Object Vision (Borland).

I?aaaea, yoi oaea ianoaiaea?oiia n?aaenoai Microsoft Windows, ii oai

ia iaiaa ?aaeecaoeey OLE noaea aiciiaeiie eiaiii a Windows.

E?iia iaoaiecia ii/oiaiai yueea, i?aaeiacia/aiiiai, a iniia-

iii, aeey iieueciaaoaey, i?ia?aiienoo a Windows aeinooiiu nia-

oeeaeueiua n?aaenoaa iaiaia aeaiiuie iaaeaeo i?eeiaeaieyie.

I?ia?aiiiui iooai iiaeii onoaiiaeoue i?yioth naycue iaaeaeo caaea-

/aie, iai?eia?, i?eieiay aeaiiua ec iineaaeiaaoaeueiiai ii?oa, aaoi-

iaoe/anee iiiauaoue eo, neaaeai, a y/aeee yeaeo?iiiie oaaeeoeu

Excel, n?aaenoaaie eioi?ie iiaeii ooo aea ioia?aaeaoue neiaeiua caaene-

iinoe a aeaea a?aoeeia eee inouanoaeyoue eo ia?aaioeo a ?aaeueiii

?aaeeia a?aiaie (yoio iaoaieci iineo iacaaiea aeeiaie/aneiai iaia-

ia aeaiiuie – Dynamic Data Exchange, DDE ).

Iniiaiua oa?ieiu

Eeeaioneia i?eeiaeaiea DDE – i?eeiaeaiea, eioi?iio iaiaoiaee-

ii onoaiiaeoue aeeaeia n na?aa?ii e iieo/eoue aeaiiua io na?aa?a a

i?ioeanna aeeaeiaa.

DDE-aeeaeia – acaeiinaycue iaaeaeo eeeaioneei e na?aa?iui i?e-

eiaeaieyie.

Na?aa?-i?eeiaeaiea – DDE i?eeiaeaiea, eioi?ia ia?aaeaao aeai-

iua eeeaioo a i?ioeanna aeeaeiaa.

DDE-O?aicaeoeey -iaiai niiauaieyie eee aeaiiuie iaaeaeo eeeai-

oii e na?aa?ii.

Item eiy – no?iea, eaeaioeoeoee?othuay iaeioi?ia iiiaeanoai

aeaiiuo, eioi?ia na?aa? a ninoiyiee ia?aaeaoue eeeaioo a i?ioeanna

aeeaeiaa.

Service eiy – no?iea, aaia?e?oaiay na?aa?ii e eniieuecoa-

iay eeeaioii aeey onoaiiaeaiey aeeaeiaa.

No?ieiaue oeacaoaeue – aeaieiia neiai, aaia?e?oaiia iia?a-

oeeiiiie nenoaiie, eaeaioeoeoee?othuaa no?ieo, ia?aaeathuothny a
i?ioean-

na aeeiaie/aneiai iaiaia aeaiiuie.

Topic eiy – no?iea, eioi?ay eaeaioeoeoee?oao oei aeaiiuo,

iaiaoiaeeiuo eeeaioneiio i?eeiaeaieth i?e aeeiaie/aneii iaiaia aeaiiuo.

Oeeueo? o?aicaeoeee – oeaa, eioi?ue i?aiyonoaoao ia?aaea/a

iaaeaeaoaeueiuo oeiia o?aicaeoeee a ooieoeeth ia?aoiiai auciaa.

A Microsoft Windows aeeiaie/aneee iaiai aeaiiuo yaeyaony oi?-

iie nayce, eioi?ay eniieuecoao iauea iaeanoe iaiyoe aeey iaiaia

aeaiiuie iaaeaeo i?eeiaeaieyie. I?eeiaeaiea iiaeao eniieueciaaoue DDE
a

iaeioi?ue iiiaio a?aiaie aeey ia?aaea/e e iieo/aiey iiauo aeaiiuo io

na?aa?a.

Iaoaieci DDE noiae n iaoaieciii ii/oiaiai yueea, eioi?ue ya-

eyaony /anoueth iia?aoeeiiiie nenoaiu WINDOWS. Nouanoaoao eeoue iac-

ia/eoaeueiay ?acieoea a oii, /oi ii/oiaue yuee, a aieueoeinoaa neo-

/aa, eniieuecoaony eae aooa? a?aiaiiiai o?aiaiey eioi?iaoeee. DDE

iiaeao auoue eieoeeaeece?iaai iieueciaaoaeai e a aieueoeinoaa neo/aaa

i?iaeieaeaoue ?aaioaoue aac aai aiaoaoaeuenoaa.

Aeaeeioaea DDEML iaania/eaaao iieueciaaoaey iaai?ii n?aaenoa,

eioi?ua oi?iuatho eniieueciaaiea iaoaiecia DDE a WINDOWS i?eeiaea-

ieyo. Aianoi oiai, /oiau ia?aaaouaaoue, iieo/aoue e ia?aaeaaaoue DDE

niiauaiey iai?yioth, i?eeiaeaiey eniieuecotho ooieoeee DDEML aeaeeioa-

ee. Aeaeeioaea DDEML oaeaea iaania/eaaao ?aaioo ni no?ieaie e ?ac-

aeaeyaiuie aeaiiuie, aaia?e?oaiuie DDE i?eeiaeaieyie. Aianoi oiai,

/oiau eniieueciaaoue oeacaoaee ia iauea iaeanoe iaiyoe, DDE i?eei-

aeaiey nicaeatho e iaiaieaathony no?ieiauie oeacaoaeyie, eioi?ua

eaeaioeoeoee?otho no?iee e aeaiiua.

Oaea nouanoaothuea i?eeiaeaiey, eniieuecothuea i?ioieie DDE, in-

iiaaiiue ia niiauaieyo iieiinoueth niaianoeiu n oaie, eioi?ua en-

iieuecotho aeaeeioaeo DDEML. Aio ii/aio i?eeiaeaiea, eniieuecothuaa

DDE-i?ioieie iiaoo onoaiiaeoue aeeaeia e auiieiyoue o?aicaeoeee n

i?eeiaeaieyie, eniieuecothueie aeaeeioaeo DDEML.

Acaeiinaycue iaaeaeo eeeaioii e na?aa?ii.

DDE aicieeaao anaaaea iaaeaeo eeeaioneei i?eeiaeaieai e na?aa?-

iui. Eeeaioneia i?eeiaeaiea eieoeeaeece?oao iaiai aeaiiuie iooai on-

oaiiaeaiey aeeaeiaa n na?aa?ii e ia?aaea/e o?aicaeoeee. O?aicaeoeey

iaiaoiaeeia aeey aeaiiuo e ianeoaeeaaiey. Na?aa? ioaa/aao ia o?aicae-

oeeth e iaania/eaaao eeeaioa aeaiiuie. Na?aa? iiaeao eiaoue n?aco ian-

eieueei eeeaioia a iaeii e oiaea a?aiy, a naith i/a?aaeue, eeeaio ii-

aeao iieo/aoue aeaiiua n?aco io ianeieueeeo na?aa?ia. Iaeioi?ia i?e-

eiaeaiea iaeiia?aiaiii iiaeao auoue e eeeaioii e na?aa?ii. A aeiaaaie

e auoaneacaiiiio, eeeaio e na?aa? iiaoo iai?aaoue aeeaeia a ethaia

oaeiaiia aeey ieo a?aiy.

DDE na?aa? eniieuecoao o?e ca?aca?ae?iaaiiuo oeia eiai, ?an-

iieiaeaiiuo ea?a?oe/ii: service, topic item – oieeaeueii eaeaioeoe-

oee?otho iaeioi?ia iiiaeanoai aeaiiuo, eioi?ia na?aa? iiaeao ia?aaeaoue

eeeaioo a i?ioeanna aeeaeiaa.

Service eiy – yoi no?iea, eioi?oth aaia?e?oao na?aa? a oa

i?iiaaeooee a?aiaie, a eioi?ua eeeaio iiaeao onoaiiaeoue aeeaeia n

na?aa?ii.

Topic eiy – yoi no?iea, eioi?ay eaeaioeoeoee?oao eiae/an-

eee eiioaeno aeaiiuo. Aeey na?aa?a, eioi?ue iaieioee?oao oaeeaie,

topic eiaia yoi i?inoi iacaaiey oaeeia; aeey ae?oaeo na?aa?ia – yoi

niaoeeoe/aneea eiaia eiie?aoiiai i?eeiaeaiey. Eeeaio iaycaoaeueii

aeieaeai oeacuaaoue topic eiy aianoa n service eiaiai, eiaaea ii oi-

/ao onoaiiaeoue aeeaeia n na?aa?ii.

Item eiy – yoi no?iea, eioi?ay eaeaioeoeoee?oao iaeioi-

?ia iiiaeanoai aeaiiuo, eioi?ia na?aa? iiaeao ia?aaeaoue eeeaioo a

i?ioeanna o?aicaeoeee. Iai?eia?, item eiy iiaeao eaeaioeoeoee?iaaoue

OeAEIA ( int, integer ), NO?IEO ( string, char * ), ianeieueei ia-

?aa?aoia oaenoa, eee BITMAP ia?ac.

Ana auoaoeacaiiua eiaia iicaieytho eeeaioo onoaiiaeoue aeea-

eia n na?aa?ii e iieo/eoue io iaai aeaiiua.

Nenoaiiue ?aaeei

Nenoaiiue ?aaeei ?aaiou iaania/eaaao eeeaioa anae iaiaoiaee-

iie eioi?ioeeae i na?aa?a.

Aeey oiai, /oiau ii?aaeaeeoue, eaeea na?aa?u aeinooiiu a aeai-

iue iiiaio a?aiaie, a oaeaea eaeie eioi?iaoeeae iie iiaoo iaania-

/eoue eeeaioa, iineaaeiee, iaoiaeynue a ia/aeueiii ?aaeeia ?aaiou, aeie-

aeai onoaiiaeoue eiy ono?ienoaa, ?aaiia NULL. Oaeie oaaeii aeeaeiaa

iaeneiaeueii oaaee/eaaao yooaeoeaiinoue ?aaiou, a oaeaea ?aaioo n

na?aa?ii a nenoaiiii ?aaeeia. Na?aa?, a naith i/a?aaeue, aeieaeai iiae-

aea?aeeaaoue ieaeaiienaiiua item eiaia, a oaeaea ae?oaea, /anoi en-

iieuecoaiua eeeaioii:

SZDDESYS ITEM TOPICS – nienie item eiai, n eioi?uie iiaeao

?aaioaoue na?aa? a aeaiiue iiiaio a?aiaie. Yoio nienie iiaeao ecia-

iyoueny a?aiy io a?aiaie.

SZDDESYS ITEM SYSITEMS – nienie item eiai, n eioi?uie ii-

aeao ?aaioaoue na?aa? a nenoaiiii ?aaeeia.

SZDDDESYS ITEM STATUS – cai?ineoue oaeouee noaoon na?aa?a.

Iau/ii, aeaiiue cai?in iiaeaea?aeeaaaony oieueei a oi?iaoa CF_TEXT e

niaea?aeeo no?ieo oeia Aioia/Caiyo.

SZDDE ITEM ITEMLIST – nienie item eiai, iiaeaea?aeeaaaiuo na?-

aa?ii a ianenoaiiii ?aaeeia ?aaiou. Yoio nienie iiaeao iaiyoueny

a?aiy io a?aiaie.

SZDDESYS ITEM FORMATS – nienie no?ie, i?aaenoaaeythuee niaie

nienie anao oi?iaoia ii/oiaiai yueea, iiaeaea?aeeaaaiuo na?aa?ii a

aeaiiii aeeaeiaa. Iai?eia?, CF_TEXT oi?iao i?aaenoaaeai no?ieie TEXT.

Iniiaiia iacia/aiea e ?aaioa ooieoeee ia?aoiiai auciaa

I?eeiaeaiea, eioi?ia eniieuecoao DDEML, aeieaeii niaea?aeaoue ooi-

eoeeth ia?aoiiai auciaa, eioi?ay ia?aaaouaaao niauoey, iieo/aiiua

i?eeiaeaieai. DDEML oaaaeiieyao i?eeiaeaiea i oaeeo niauoeyo iooai

iinueee o?aicaeoeee a ooieoeeth ia?aoiiai auciaa aeaiiiai i?eeiaeaiey.

A caaeneiinoe io oeaaa oeeueo?a o?aicaeoeee, noi?ie?iaaiiiai

i?e auciaa ooieoeee DdeInitialize, ooieoeey ia?aoiiai auciaa iieo-

/aao ioni?oe?iaaiiua o?aicaeoeee aia caaeneiinoe io oiai, yaeyao-

ny ee aeaiiia i?eeiaeaiea eeeaioii, na?aa?ii eee oai e ae?oaei iae-

iia?aiaiii. Neaaeothuee i?eia? aeaiiino?e?oao iaeaieaa oeie/iia en-

iieueciaaiea ooieoeee ia?aoiiai auciaa.

HDDEDATA CALLBACK DdeCallback( uType, uFmt, hconv, hsz1,

hsz2, hdata, dwData1, dwData2 )

UINT uType; // Oei o?aicaeoeee

UINT uFmt; // Oi?iao ii/oiai yueea

HCONV hconv; // Eaeaioeoeeaoi? aeeaeiaa

HSZ hsz1; // Eaeaioeoeeaoi? no?iee #1

HSZ hsz2; // Eaeaioeoeeaoi? no?iee #2

HDDEDATA hdata; // Eaeaioeoeeaoi? aeiaaeueiiai iauae-

oa iaiyoe

DWORD dwData1; // Aeaiiua oaeouae o?aicaeoeee #1

DWORD dwData2; // Aeaiiua oaeouae o?aicaeoeee #2

{

switch (uType)

{

case XTYP_REGISTER:

case XTYP_UNREGISTER:

. . .

return (HDDEDATA) NULL;

case XTYP_ADVDATA:

. . .

return (HDDEDATA) DDE_FACK;

case XTYP_XACT_COMPLETE:

. . .

return (HDDEDATA) NULL;

case XTYP_DISCONNECT:

. . .

return (HDDEDATA) NULL;

default:

return (HDDEDATA) NULL;

}

}

Ia?aiao? uType eaeaioeoeoee?oao oei iineaiiie o?aicaeoeee a

ooieoeeth ia?aoiiai auciaa i?e iiiiue DDEML. Cia/aiey inoaaoeony

ia?aiao?ia caaenyo io oeiia o?aicaeoeee. Oeiu o?aicaeoeee aoaeoo ia-

noaeaeaiu iaie a ?acaeaea “Ia?aaioea O?aicaeoeee”.

Aeeaeia iaaeaeo i?eeiaeaieyie

Aeeaeia iaaeaeo eeeaioii e na?aa?ii anaaaea onoaiaaeeaaaony ii

o?aaiaaieth eeeaioa. Eiaaea aeeaeia onoaiiaeai, iaa ia?oia?a iieo-

/atho eaeaioeoeeaoi?, eioi?ue iienuaaao aeaiiue aeeaeia.

Ia?oia?u eniieuecotho yoio eaeaioeoeeaoi? a aieueoeinoaa ooi-

eoeee DDEML aeey iinueee o?aicaeoeee e aeey eo ia?aaioee. Eeeaioo ii-

aeao iio?aaiaaoueny aeeaeia eae n iaeiei na?aa?ii, oae e n ianeieueee-

ie.

?anniio?ei iiae?iaii eae i?eeiaeaiea onoaiaaeeaaao aeeaeia e

iieo/aao eioi?iaoeeth i oaea nouanoaothueo eaiaeao nayce.

I?inoie Aeeaeia

Eeeaioneia i?eeiaeaiea onoaiaaeeaaao i?inoie aeeaeia n na?aa-

?ii iooai auciaa ooieoeee DdeConnect e ii?aaeaeyao eaeaioeoeeaoi?u

no?ie, eioi?ua niaea?aeao anth iaiaoiaeeioth eioi?iaoeeth i service eia-

ie oaeouaai na?aa?a e eioa?anouai eeeaioa a aeaiiue iiiaio topic

eiaie.

DDEML ioaa/aao ia aucia yoie ooieoeee iinueeie niioaaonoaoth-

uae o?aicaeoeee XTYP_CONNECT a ooieoeeth ia?aoiiai auciaa eaaeaeiai

aeinooiiiai a aeaiiue iiiaio a?aiaie na?aa?a, ca?aaeno?e?iaaiiia

eiy eioi?iai niaiaaeaao n eiaiai, ia?aaeaiiui i?e iiiiue ooieoeee

DdeConnect i?e oneiaee, /oi na?aa? ia ioeeth/ae oeeueo? service

eiaie auciaii ooieoeee DdeServiceName.

Na?aa? iiaeao oaeaea onoaiiaeoue oeeueo? ia XTYP_CONNECT o?ai-

caeoeeth caaeaieai niioaaonoaothuaai oeaaa CBF_FAIL_CONNECTIONS i?e

auciaa ooieoeee DdeInitialize.

A i?ioeanna ia?aaioee o?aicaeoeee oeia XTYP_CONNECT DDEML ia-

?aaeaao iieo/aiiua io eeeaioa service e topic eiaia na?aa?o. Na?-

aa? aeieaeai i?iaa?eoue yoe eiaia e aica?aoeoue TRUE, anee ii a nin-

oiyiee ?aaioaoue n oaeeie eiaiaie, e FALSE a i?ioeaiii neo/aa.

Anee ie iaeei ec nouanoaothueo na?aa?ia ia ioaa/aao ia CONNECT-cai-

?in eeeaioa, ooieoeey DDeConnect aica?auaao aio NULL n eioi?ia-

oeeae i oii, /oi a aeaiiue iiiaio a?aiaie IA aiciiaeii onoaiiaeoue

aeeaeia.

Iaeiaei, anee na?aa? aica?aoee TRUE, oi aeeaeia aue oniaoii

onoaiiaeai e eeeaio iieo/aao eaeaioeoeeaoi? aeeaeiaa

– aeaieiia neiai, iin?aaenoaii eioi?iai e aaaeaony

iaiai aeaiiuie n na?aa?ii.

Caoai na?aa? iieo/aao o?aicaeoeeth aeaea XTYP_CONNECT_CONFIRM

(a neo/aa, anee ii IA iienuaae oeaa oeeueo?a CBF_FAIL_CONFIRMS i?e

auciaa niioaaonoaothuae ooieoeee).

A ieaeai?eaaaeaiiii i?eia?a i?iecaiaeeony iiiuoea onoaiiaeoue

aeeaeia n na?aa?ii, eioi?ue a ninoiyiee ?aaioaoue n service eiaiai

‘My Server’ a nenoaiiii ?aaeeia. N/eoaai, /oi ia?aiao?u

hszSysTopic e hszServName oaea i?aaeaa?eoaeueii nicaeaiu iaie ?aiaa.

HCONV hConv;

HWND hwndParent;

HSZ hszServName;

HSZ hszSysTopic;

. . .

hConv = DdeConnect(

idInst, // Eiiey i?eeiaeaiey

hszServName, // Eaeaioeoeeaoi?

service-eiaie

handle hszSysTopic,// Eaeaioeoeeaoi?

system-topic-eiaie

(PCONVCONTEXT) NULL); // Eniieuecoai eiioaeno

ii oiie/aieth

if( hConv == NULL )

{

MessageBox( hwndParent, “MyServer IA aeinooiai!”,

(LPSTR) NULL, MB_OK );

return FALSE;

}

. . .

A yoii i?eia?a ooieoeey DdeConnect canoaaeyao DDEML iinu-

eaoue o?aicaeoeeth aeaea XTYP_CONNECT a ooieoeeth ia?aoiiai auciaa na?-

aa?a MyServer.

A oaia?ue i?eaaaeai i?eia? ooieoeee ia?aoiiai auciaa na?aa?a,

eioi?ue ia?aaaouaaao o?aicaeoeeth XTYP_CONNECT e n?aaieaaao naia

ca?aaeno?e?iaaiiia eiy n eiaiai, iieo/aiiui io eeeaioa. Eae oaea

auei ioia/aii ?aiaa, anee iie niaiaaeatho, oi na?aa? a ninoiyiee

onoaiiaeoue aeeaeia n eeeaioii.

#define CTOPICS 5

HSZ hsz1; // Eaeaioeoeeaoi? no?iee,

iieo/aiiue io DDEML.

HSZ ahszTopics[CTOPICS]; // Iannea iiaeae?aaeeaaaiuo

topic eiai

int i; // N/ao/ee oeeeea

.

. // Aeey ia?aaioee o?aicaeoeee eniieuecoai noaiaea?oioth

ANSI C

. // eiino?oeoeeth switch –> case –> default.

.

case XTYP_CONNECT:

for (i = 0; i AM , 1 –> PM

} TIME;

HDDEDATA EXPENTRY DdeCallback

(uType, uFmt, hconv, hsz1, hsz2, hdata,

dwData1, dwData2)

UINT uType;

UINT uFmt;

HCONV hconv;

HSZ hsz1;

HSZ hsz2;

HDDEDATA hdata;

DWORD dwData1;

DWORD dwData2;

{

CHAR szBuf[32];

switch (uType)

{

case XTYP_ADVREQ:

case XTYP_REQUEST:

if ((hsz1 == hszTime && hsz2 == hszNow)

&& (uFmt == CF_TEXT))

{

// Eiie?oai no?ieo a aooa?.

itoa(tmTime.hour, szBuf, 10);

lstrcat(szBuf, “:”);

if (tmTime.minute OLE-oaoiieiaey Eae aeaeii ec iienaiiiai auoa i?ioieiea DDE, i?eeiaeaiey aeieaeiu iaycaoaeueii ciaoue oeiu ia?aaeaaaaiuo aeaiiuo, oiaoue eo ia?a- aaouaaoue, a a iniiaiii aeaaea iiaoo ?aaioaoue oieueei n neiaieueiuie no?ieaie. Yoi, eiia/ii, ia i/aiue oaeiaii, eiaaea iaiaoiaeeii, iai?e- ia?, nicaeaoue iaaieueoie oaeno n ?acee/iuie ea?oeieaie, ieeoia?ai- iaie e ae?oaeie iaaeyaeiuie eee ia i/aiue eeethno?aoeeyie. A yoii neo- /aa ia iiiiuue i?ia?aiienoo i?ieoiaeeo OLE - ano?aeaaiea iauaeoia. Aianoa n aeaiiuie iu iieo/aai iaoeiiue eiae, eioi?ue yoe aeaiiua ii- aeao ia?aaaouaaoue. Niiniau oii?yaei/eaaiey, enoi/ieee e oeaeaaua aeieoiaiou I?e eniieueciaaiee OLE-oaoiieiaee iieueciaaoaeue anaaaea eiaao aeaei n iaeiei aaaeouei i?eeiaeaieai (aeaaiui) e iaeiei aaaeiiui (iiae- /eiaiiui), a oi/iaa, niaeiei aaaeiiui. I?eeiaeaiea, n iiiiuueth eioi?iai iieo/ai iauaeo aeey ano?aeaa- iey anaaaea ea?aao ?ieue iiae/eiaiiiai. Yoi iniaaiii oa?aeoa?ii aeey neo/aaa ia?aaea/e iauaeoia i?e ano?aeaaiee e naycuaaiee /a?ac ao- oa? i?iiaaeooi/iiai iaiaia. *anoi eniieuecoaiua oa?ieiu I?eeiaeaiea-enoi/iee e Oeaeaaia i?eeiaeaiea eanathony ia iiae/eiaiey i?eeiaeaiee, a ii?aaeaeytho aaiaa- eiaeth iauaeoia. Iaeioi?ua Windows-i?eeiaeaiey iiaoo aunooiaoue oieueei a ?iee iiae/eiaiiuo, a iaeioi?ua oieueei a ?iee aaaeoueo. Iai?eia?, Paintbrush a OLE oaoiieiaee iiaeao ea?aoue oieueei ?ieue iiae/eiaiii- ai i?eeiaeaiey, neoaeauaai aeey nicaeaiey e iiaeeoeeaoeee ioaeaeueiuo iauaeoia. Ae?oaea i?eeiaeaiey, iai?eia?, Write eee Cardfile iiaeii n/eoaoue ii?aaaeaiiui n oi/ee c?aiey, /oi ai?acaei /aua i?eoiaeeony anoaaeyoue eeethno?aoeee a neiaeiua ii no?oeoo?a oaeno, /ai oaeno a eeethno?aoeee. Iiaua i?eeiaeaiey,oaeea eae Word, iiaoo auiieiyoue a ?aieao OLE iaa yoe ooieoeee. Oiio?aaeaiea oa?ieia iauaeo n/eoaaony i?anoeaeiui a e?oaao i?ia?aiienoia, oioy /anoi ii oiio?yaeyaony e ia e ianoo. Anyeee ?ac?aaio/ee ii/eoaao naiei aeieaii i?eiaieoue a naiai i?iaeoeoa III aac iniaie ia oi iaiaoiaeeiinoe. A n?aaea Windows a oa?iei iauaeo aeeaaeuaaaony ianeieueei niaoeeoe/aneee niune. Iieueciaaoaey ia i?ea- eaoatho iinoeaaoue acu III, eee caiyoueny eiino?oe?iaaieai iauaeoia ia N++. Eiaaea ia iauaeoao aiai?yo a ?aieao Windows, oi eiatho a aeaeo aiciiaeiinoue ano?aeaaiey a iaeioi?ue aeieoiaio o?aaiaioa, ii?iaeaeai- iiai ae?oaei i?eeiaeaieai. Aio yoi "eii?iaeiia oaei" e iacuaaaony iauaeoii. A oaeii iiaeoiaea iao ie/aai iiaiai. Eiaaea a oaeno, iiaeaioaa- eeaaaiue Write, anoaaeyaony ?enoiie ec Paintbrush iin?aaenoaii Clipboard eee oaaeeoe Exnel, a aeieoiaio, iiaeaioaaeeaaaiue a Word, oi ?acoeueoaoii aeaenoaey aoaeao eae ?ac iiyaeaiey iauaeoa. O?aaeeoeeiiiua iauaeou anaaaea i?aaenoaaeytho niaie eiiee. ?aai- oa n ieie iniiauaaaony ia oii, /oi ana Windows i?eeiaeaiey iiaeaea?- aeeaatho ia oieueei naie nianoaaiiue oi?iao , ii e iaeioi?ue iaia- uaiiue, noaiaea?oiue, ea?athuee ?ieue iauaecaanoiiai iaaeaeoia?iaeiiai ycuea. Anee, iai?eia?, a oaenoiaue aeieoiaio anoaaeyaony oaaeeoea ec oaaee/iiai i?ioeanni?a, oi aoooa? i?iiaaeooi/iiai iaiaia i?aia- ?acoao aa a oi?iao e noaiaea?oiiio, e oai naiui iaania/eaaao anoaaeo. Oaeay eiiey a oaenoiaii ?aaeaeoi?a ii aeaeo ia ioee/aaony io i?eaeiaeo, ii iia iaaeinooiia aeey aianaiey eciaiaiee. Iaaiciiae- ii, anoaaea oaeei niiniaii eiieth ec Paintbrush a Write aeieoiaio, eciaieoue oeaao, oieueio eeiee eee ianooaa. Iiaua iauaeou, aeinooiiua a ?aieao Windows 3.1 i/aiue iioiaee ia o?aaeeoeeiiiua, ii iie ia yaeythony eiieyie - yoi i?eaeiaeu. Iie eiathony a aaeeinoaaiiii yecaiiey?a e iaoiaeyony iaiino?aaenoaaiii a oeaeaauo aeieoiaioao. Oai iie nouanoaotho iaeiia?aiaiii a aeaoo oi?ia- oao - a noaiaea?oiii e a oi?iaoa i?eeiaeaiey-enoi/ieea. Aeaaiaea?y noaiaea?oiiio oi?iaoo iauaeo iiaeao eaeeoee?iaaoueny e nio?aiyoue a ?aieao oeaeaaiai aeieoiaioa. Eiaaony aiciiaeiinoue ia?a- aioee iauaeoa oaeaea, eae e ethaiai oaeea i?eaeiaea. Neooaoeey aua- eyaeeo oae, neiaii aioo?e iauaeoa ano?iai ae?oaie. Yoi iaania/e- aaao aeinooi e n?aaenoaai ia?aaioee iiaiai iauaeoa (i?eeiaeaieth-en- oi/ieeo) iin?aaenoaii i?inoiai aeaieiiai uae/ea ia iauaeoa. Ano?iaiiua iauaeou Eioi?iaoeey, anoaaeaiiuy a aeieoiaio oeaeaaiai i?eeiaeaiey, i?aaenoaaeyao niaie iauaeo. Oaeie iauaeo ano?aeaaaony a aeieoiaio, ia?aaaouaaaiue aaaeouei i?eeiaeaieai. Yoi cia/eo, /oi ii ?anniao?e- aaaony eae ninoaaiay /anoue aeaiiiai aeieoiaioa, iiaeao ?ania/aou- aaoueny e nio?aiyoueny aianoa n iei. Oaeea iauaeou iiaoo niaea?aeaoue eioi?iaoeeth ethaiai oeia: oaeno, oaaeeoeu, a?aoeee e ae?. Ano?iaiiua iauaeou nouanoaotho oieueei a aaeeinoaaiiii yecai- iey?a e oeueei oai, aaea iie ano?iaiu - a oeaeaaii aeieoiaioa. Ia?a- aaouaathony iie naieie "?iaeeoaeueneeie" i?ia?aiiaie, aucuaaaiuie aanueia yooaeoeaiui niinaii, a ioee/aa io o?aaeeoeeiiiiai. Naycuaaiea n ?iaeeoaeueneei i?eeiaeaieai Neaaeothuae aanueia oaeiaiie iniaaiiinoueth ano?iaiiuo iauaeoia yaeyaony oi, /oi iie inoathony naycaiiuie n ii?iaeeaoei eo i?eeiaea- ieyie. Aeaaiaea?y yoiio iieueciaaoaeue ecaaaeyaony io iaiaoiaeeiinoe iiiieoue eiaia e aee?aeoi?ee oaeeia-enoi/ieeia. Aeinoaoi/ii aeaieii- ai uae/ea ia iauaeoa - e ?iaeeoaeueneay i?ia?aiia caioneaaony. Aaaeiui aeinoieinoaii iiaeiaiiai naycuaaiey ano?iaiiuo iauae- oia yaeyaony iiaeeueiinoue aeieoiaioia. Iiaeii eaaei ia?aianoe oaeie aeieoiaio n iaeiie iaoeiu ia ae?oaoth (iaiaoiaeeii oieueei /oiau ia ieo iaaeo auea onoaiiaeaia iaiei/ea e auee iaiaoiaeeiua i?eeiaeaiey eee aeeiaie/aneea aeaeeioaee io ieo). Aeey ia?aaioee ano?iaiiuo iauae- oia aeinoaoi/ii aoaeao uaeeiooue ii iae aeaaaeaeu e ia ae?oaie iaoeia i?iecieaeao oiaea naiia, /oi e ia aaoae: auciaaony niioaaonaothuaa i?eeiaeaiea. A yoii neo/aa iaiaoiaeeiui oneiaeai ia?aiina yaeyaony iaee/ea ia ae?oaie iaoeia oaenoiaiai ?aaeaeoi?a Write e a?aoe/anei- ai ?aaeaeoi?a Paintbrush. I?e ?aaioa a ?aieao DDE oaeie ia?aiin ia aiciiaeai, oi/iaa ii aoaeao aeeth/aoue a naay ia oieueei ia?aiin naiiai oaeea-aeieoiaioa, ii e naycaiiuo n aeaiiui oaeeii oaeeia-enoi/ieeia e oeaeaauo oae- eia - anae no?oeoo?u. Ia?niaeoeau ?acaeoey OLE Oaoiieiaey OLE aeaeaao oieueei ia?aua oaae. Iiea oieueei iaei- oi?ua Windows i?eeiaeaiey yaeythony OLE niaianoeiuie. N?aaee ooeeeo a?oiiu Accessories aa?nee 3.1 oaeeie ia naaiaeiaoiee aeaiue yaeytho- ny oieueei Write, Paintbrush e Cardfile. Ii aeaaea iie "a naiai e?o- ao" ia aeiioneatho anoaaee a i?iecaieueiii iai?aaeaiee (o.a. ec eth- aie a ethaoth ae?oaoth). A ianoayuaa a?aiy ?a/ue eaeao i iiaeaea?aeea iae- aieaa ii?aaaeaiiiai n i?aeoe/aneie oi/ee c?aiey "iai?aeaiey ano?aeaaiey" - ec Paintbrush a Write e Nardfile aeieoiaioa. *oiau ii?aaeaeeoue eaeea ec i?eeiaeaiee iiaeaea?aeeaath OLE eioa?- oaen, iaiaoiaeeii ec OLE-niaianoeiiai i?eeiaeaiey auiieieoue aee?ae- oeao "ANOAAEOUe IAUAEO" a iaith "Edit". A io?uaoainy ieia aoaeao i?iaeaiiino?e?iaai nienie aeinooiiuo ano?aeaaaiuo iauaeoia. A ianoiyuee iiiaio iiiaea eiiieeyoi?u oaea aaaee iiiaea?aeeo OLE a naie aeaeeioaee: Borland C++ ver4.5. I?eia? eniieueciaaiey OLE oaoiieiaee i?eaaaeai a i?eeiaeaiee 1. Aeaiiay i?ia?aiia eniieuecoao nic- aeaiiue ?enoiie Paintbrush a aeaea oaeea eee eiie?oao aai ec Clipboard. Caeeth/aiea A caeeth/aiee oioaeinue au ioiaoeoue, /oi nouanoaothuea niiniau iaiaia eioi?iaoeee aicieeaee aianoa n ?acaeoeai Windows. Eae naia nooue Windows, iie yaeythony i?iaeieaeaieai caeiaeaiiie a iaa oeaeue: ciiniaiinoue ?aaioaoue n oaeeaie ethauo oi?iaoia, ia ethaii iai?oaeiaaiee. A ioee/ea io noaiaea?oiiai ?aoaiey, eiaaea oe?ia-i?iecaiaeeoaeue iai- ei/ee (oeia Windows) iuoaeanue naia iaienaoue ?acee/iua ae?aeaa?u aeey iiaeaea?aeee ono?ienoa e ?acee/iua aeaeeioaee aeey iiaeaea?aeee oi?iaoia iiiai/eneaiiuo oaeeia ae?oaeo iaeaoia, oe?ia Microsoft aiceiaeeea yoo iaycaiiinoue ia i?iecaiaeeoaeae iai?oaeiaaiey e i?ia?aiiiiai iaania/aiey. Oaeei ia?acii, iineaaeiaaoaeueiia ?acae- oea Clipboard-->DDE–>OLE yaeyaony i?iaeieaeaieai aiieiuaiey

eaeae “nai ecia?ae – nai aiaae?ye”. Anoannoaaiii, iaeaieueoea ia-

aeaaeaeu nae/an aiceaaathony ia OLE (aa iiaue noaiaea?o OLE.2), oae eae

yoio noaiaea?o iicaieyao aeeth/aoue a naay i/aiue iiuiua n?aaenoaa,
oaeea

eae Multimedia. A iaeiii oaeea iiaeao iaoiaeeony ia oieueei oaeno,

?enoiie, a e aeaaea oeaeue oeeuei, iieiinoueth icao/aiiue e aioiaue

e iieaco.

NIENIE EEOA?AOO?U

1. Aeaaeeia N.A. O?ieia A.A. I?ia?aiie?iaaiea a Microsoft Windows:

A 2-o /anoyo. I.:”AeEAEIA-IEOE”, 1992.

2. Oieoe N. Windows 3.1 aeey iieueciaaoaey. Ia?. n iaiaoeeiai

Eeaa:BHV, 1992.

3. Microsoft Windows Software Development Kit. Version 3.

Programmer’s Reference, Programming Tools, Windows Extensions.

4. Charles Petzold. Programming Windows. Microsoft Press.

5. Aeaeey Windows 3.X. I.: E.A.E. – Nioo, 1992.

6. Borland C++. Usres manual.

I?eeiaeaiea 1. I?eia? eniieueciaaiey OLE oaoiieiaee

// ObjectWindows – (C) Copyright 1992 by Borland International

//

// oleclnt.cpp

// I?eia? Ole Client i?ia?aiiu, enieuecothuae OWL. Iia iieacuaaao

// i?eia? eniieueciaaiey Ole functions, e C++ eeannia .

// Iniiaiia ieii iicaieyao iieueciaaoaeth nicaeaoue paint brush

// object, eee eiie?iaaoue aai ec clipboard.

#include

#include

#include

#include

#include

#include

#include

#include

#pragma hdrstop

#include “oleclnte.h”

#include “oleclntr.h”

#include “oleclnt.h”

// noaoe/aneea aeaiiua eeanna

LPOLECLIENTVTBL TOwlClient::lpClientVtbl = NULL;

int TOleDocWindow::nNextObjectNum = 0;

void TOleApp::InitInstance()

{

TApplication::InitInstance();

vcfLink = RegisterClipboardFormat( “ObjectLink” );

vcfNative = RegisterClipboardFormat( “Native” );

vcfOwnerLink = RegisterClipboardFormat( “OwnerLink” );

// comments in owlole.h mention these ole clipboard formats

}

// iienaiea ooieoeee OWL Object, eioi?ua

// iicaieytho o?aieoue iienaiea Ole Object

int FAR PASCAL _export StdCallBack(LPOLECLIENT lpClient,

OLE_NOTIFICATION notification,

LPOLEOBJECT lpObject )

{

return (( PTOwlClient )lpClient)->TOleDocWindowThis->

CallBack( lpClient ,

notification,

lpObject );

}

TOwlClient::TOwlClient( PTOleDocWindow owner , HINSTANCE hInst )

{

TOleDocWindowThis = owner;

if ( !lpClientVtbl )

{

lpClientVtbl = new OLECLIENTVTBL;

if ( hInst == 0 ) {

lpClientVtbl->CallBack = StdCallBack;

} else {

lpClientVtbl->CallBack = (TCallBack)

MakeProcInstance( (FARPROC)StdCallBack,

hInst );

}

}

lpvtbl = lpClientVtbl;

}

void TOleDocWindow::WMURedraw( RTMessage )

{

bObjectLoaded = TRUE;

InvalidateRect( HWindow, NULL, TRUE );

UpdateWindow( HWindow );

}

#pragma argsused

int TOleDocWindow::CallBack( LPOLECLIENT lpOleClient ,

OLE_NOTIFICATION oleNot,

LPOLEOBJECT lpOleObject )

{

switch ( oleNot ) {

case OLE_CHANGED:

case OLE_SAVED:

PostMessage( HWindow , WM_U_REDRAW, 0, 0L );

break;

case OLE_CLOSED:

break;

case OLE_QUERY_PAINT:

break;

case OLE_RELEASE:

break;

case OLE_RENAMED:

break;

default:

break;

}

return TRUE;

}

void TOleDocWindow::CMAbout( RTMessage )

{

MessageBox( HWindow , “OLE Client Program\n

Written using ObjectWindows\nCopyright (c) 1992 Borland”,

GetApplication()->Name, MB_OK );

}

// nicaeaiea iiaie paint brush

void TOleDocWindow::CMPBrush( RTMessage )

{

BackupObject();

bObjectLoaded = FALSE;

lstrcpy( lpszObjectName, GetNextObjectName() );

ret = OleCreate( “StdFileEditing”,

(LPOLECLIENT)pOwlClient,

“PBRUSH”,

lhClientDoc,

GetApplication()->Name,

&lpObject,

olerender_draw,

0 );

// Nicaeaiea Ole Object – aneio?iiiay iia?aoeey.

// Iaiaoiaeeii iaeeaeaoue aai nicaeaiea, eia/a

// iiaoo aicieeiooue ioeaee i?e ia?aaioea

// niiauaiee yoiai iauaeoa.

wait( ret , lpObject );

// OleSetHostNames onoaiaaeeaaao eiy a na?aa?a OLE.

ret = OleSetHostNames( lpObject, GetApplication()->Name,

lpszObjectName );

wait( ret , lpObject );

}

void TOleDocWindow::CMUndo( RTMessage msg)

{

if ( lpUndoObject )

if ( lpUndoObject != lpObject )

{

LPOLEOBJECT lpObjectToDelete = lpObject;

lpObject = lpUndoObject;

lpUndoObject = NULL;

ret = OleDelete( lpObjectToDelete );

wait( ret , lpObjectToDelete );

bObjectLoaded = bUndoObjectLoaded;

WMURedraw( msg );

}

}

void TOleDocWindow::CMCut( RTMessage msg)

{

CMCopy( msg );

CloseCurrentOle();

}

void TOleDocWindow::CMCopy( RTMessage )

{

if ( OpenClipboard( HWindow ) && EmptyClipboard() )

{

ret = OleCopyToClipboard( lpObject );

check( ret );

CloseClipboard();

}

}

void TOleDocWindow::BackupObject()

{

if ( lpObject )

{

ret = OleClone( lpObject, (LPOLECLIENT)pOwlClient,

lhClientDoc, GetApplication()->Name,

&lpUndoObject );

wait( ret, lpObject );

lstrcpy( lpszLastObjectName, lpszObjectName );

lstrcpy( lpszObjectName , GetNextObjectName() );

bUndoObjectLoaded = bObjectLoaded;

}

}

void TOleDocWindow::CMPaste( RTMessage )

{

if ( OpenClipboard( HWindow ) )

{

BackupObject();

lstrcpy( lpszObjectName, GetNextObjectName() );

ret = OleCreateFromClip( “StdFileEditing”,

(LPOLECLIENT)pOwlClient,

lhClientDoc,

lpszObjectName,

&lpObject,

olerender_draw,

0 );

check( ret );

ret = OleSetHostNames( lpObject,

GetApplication()->Name, lpszObjectName );

wait( ret , lpObject );

bObjectLoaded = TRUE;

CloseClipboard();

PostMessage( HWindow , WM_U_REDRAW, 0, 0L );

}

}

LPSTR TOleDocWindow::GetNextObjectName()

{

static char buffer[ MAXPATH ];

wsprintf( buffer, “object #%03d”, nNextObjectNum++ );

return buffer;

}

void TOleDocWindow::Paint( HDC hdc, PAINTSTRUCT _FAR &)

{

LPOLEOBJECT lpObjectToDraw = NULL;

if ( bObjectLoaded )

lpObjectToDraw = lpObject;

else if ( lpUndoObject )

lpObjectToDraw = lpUndoObject;

if ( lpObjectToDraw ) {

RECT rect;

GetClientRect( HWindow, &rect );

// Caia/aiea ii OleDraw:

// OleDraw aeieaeai aica?auaoue OLE_ERROR_OBJECT, anee

// object aue ia?eniaai iaaa?ii.

ret = OleDraw( lpObjectToDraw , hdc, &rect ,

NULL, 0 );

wait( ret, lpObjectToDraw );

}

}

TOleDocWindow::TOleDocWindow( PTWindowsObject parent,

LPSTR title )

: TWindow( parent, title )

{

ret = OLE_OK;

lhClientDoc = 0;

bObjectLoaded = FALSE;

bUndoObjectLoaded = FALSE;

bUndoObjectLoaded = FALSE;

pOwlClient = NULL;

lpObject = NULL;

lpUndoObject = NULL;

strcpy( lpszDocName , “noname.ole” );

*lpszLastObjectName = 0;

*lpszObjectName = 0;

bDefDocName = TRUE;

}

void TOleDocWindow::SetupWindow() {

TWindow::SetupWindow();

RegisterClientDoc();

pOwlClient = new TOwlClient( this );

}

void TOleDocWindow::RegisterClientDoc() {

ret = OleRegisterClientDoc(

GetApplication()->Name,

lpszDocName,

0,

&lhClientDoc );

check( ret );

}

void TOleDocWindow::ShutDownWindow()

{

CloseCurrentOle();

if ( pOwlClient ) delete pOwlClient;

TWindow::ShutDownWindow();

}

void TOleDocWindow::RegFileName( LPSTR FileName )

{

lstrcpy( lpszDocName , FileName );

ret = OleRegisterClientDoc( GetApplication()->Name,

lpszDocName ,

0,

&lhClientDoc );

check ( ret );

}

void TOleDocWindow::CMActivate( RTMessage )

{

BackupObject();

RECT rect;

GetClientRect( HWindow, &rect );

ret = OleActivate( lpObject , OLEVERB_PRIMARY, TRUE,

TRUE ,

HWindow , &rect );

wait ( ret, lpObject );

PostMessage( HWindow , WM_U_REDRAW, 0, 0L );

}

void TOleDocWindow::WMInitMenu( RTMessage msg )

{

HMENU hMenu = (HMENU)msg.WParam;

WORD wEnableUndo;

if ( (lpObject != lpUndoObject) &&

( lpUndoObject != NULL ))

wEnableUndo = MF_ENABLED;

else wEnableUndo = MF_GRAYED;

EnableMenuItem( hMenu, CM_UNDO ,

wEnableUndo );

EnableMenuItem( hMenu, CM_COPY ,

( bObjectLoaded ? MF_ENABLED : MF_GRAYED ));

EnableMenuItem( hMenu, CM_CUT ,

( bObjectLoaded ? MF_ENABLED : MF_GRAYED ));

ret = OleQueryCreateFromClip( “StdFileEditing”,

olerender_draw, 0 );

EnableMenuItem( hMenu, CM_PASTE ,

(( ret == OLE_OK ) ? MF_ENABLED : MF_GRAYED ));

EnableMenuItem( hMenu, CM_ACTIVATE ,

( bObjectLoaded ? MF_ENABLED : MF_GRAYED ));

EnableMenuItem( hMenu, CM_CLEAR ,

( bObjectLoaded ? MF_ENABLED : MF_GRAYED ));

DrawMenuBar( HWindow );

}

LPSTR TOleDocWindow::GetClassName() { return “OLEDOCWINDOW”; }

void TOleDocWindow::GetWindowClass(WNDCLASS _FAR &wc )

{

TWindow::GetWindowClass( wc );

wc.lpszMenuName = “MENU_DOCWINDOW”;

}

void TOleDocWindow::CMClear( RTMessage )

{

CloseCurrentOle();

}

void TOleDocWindow::CloseCurrentOle()

{

// ieii/aoaeueiia nio?aiaiea

if ( lpObject ) {

ret = OleDelete( lpObject );

wait( ret , lpObject );

}

if ( lpUndoObject ) {

ret = OleDelete( lpUndoObject );

wait( ret , lpObject );

}

lpObject = lpUndoObject = NULL;

bObjectLoaded = FALSE;

InvalidateRect( HWindow , NULL, TRUE );

UpdateWindow( HWindow );

}

void TOleApp::InitMainWindow()

{

MainWindow = new TOleDocWindow(NULL, “OWL OLE Application” );

}

int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,

LPSTR lpCmd, int nCmdShow)

{

TOleApp OleApp (“OleApp”, hInstance, hPrevInstance,

lpCmd, nCmdShow);

OleApp.Run();

return (OleApp.Status);

}

Нашли опечатку? Выделите и нажмите CTRL+Enter

Похожие документы
Обсуждение

Оставить комментарий

avatar
  Подписаться  
Уведомление о
Заказать реферат!
UkrReferat.com. Всі права захищені. 2000-2020