Programing Learn Visua Ebook free download

Special Edition Using Visual C++ 6 Table of Contents:

  

  Part I - Getting Started with Visual C++

  Part II - Getting Information from Your Applications

  Part III - Improving Your User Interface

  Part IV - ActiveX Applications and ActiveX Controls

  ●

   Part V - Internet Programming

   Part VI - Advanced Programming Techniques

   Part VII - Appendixes

  

  © Copyr igh t Ma cmil l a n Compu t er Pu bl ish in g. Al l r igh t s r eser ved.

Introduction ●

  

About the Author

  Kat e Gr e g o r y is a f ou n din g pa r t n er of Gr egor y Con su l t in g Limit ed

  (www.g r e g c o ns.c o m), wh ich h a s been pr ovidin g con su l t in g a n d devel opmen t ser vices t h r ou gh ou t Nor t h Amer ica sin ce 1986. Her exper ien ce wit h C++ st r et ch es ba ck t o bef or e Visu a l C++ exist ed - sh e en t h u sia st ica l l y con ver t ed u pon seein g t h e f ir st r el ea se. Gr egor y Con su l t in g devel ops sof t wa r e a n d Web sit es a n d specia l iz es in combin in g sof t wa r e devel opmen t wit h Web sit e devel opmen t t o cr ea t e a ct ive sit es. Th ey bu il d qu a l it y cu st om a n d of f -t h e-sh el f sof t wa r e compon en t s f or Web pa ges a n d ot h er a ppl ica t ion s.

Dedication

  

To my children, Beth and Kevin, who keep me connected to the world away from the keyboard, and

remind me every day how good it feels to learn new things.

Acknowledgments

  Wr it n g a book is h a r d, h a r d wor k. Wh a t ma kes it possibl e is t h e su ppor t I get f r om t h ose a r ou n d me. Fir st , a s a l wa ys, my f a mil y, Br ia n , Bet h , a n d Kevin , wh o kn ow it 's on l y t empor a r y. Br ia n does dou bl e du t y a s bot h su ppor t ive h u sba n d a n d wor l d's best t ech n ica l edit or . Th is t ime a r ou n d I wa s l u cky en ou gh t o h a ve Br ya n Ol iver h el pin g, sh oot in g f igu r es, t est in g code, f in din g bu gs, a n d gen er a l l y pit ch in g in . Th a n ks, Br ya n . Th er e is a n a r my of edit or s, pr oof er s, in dexer s, il l u st r a t or s, a n d gen er a l sa in t s wh o t u r n my Wor d docu men t s in t o t h e book you h ol d in you r h a n d. Ma n y of t h e t ea m member s t h is t ime h a ve been in vol ved in ot h er Qu e pr oject s wit h me, a n d I kn ow t h a t I l a n ded t h e "good on es" f or t h is book. Specia l men t ion h a s t o go t o Ol a f Medin g, wh o pr ovided a t er r if ic t ech edit ba sed on a f a st -ch a n gin g pr odu ct . Joe Ma sson i a n d Mike Bl a sz cz a k a t Micr osof t h a ve a l so ea r n ed my gr a t it u de du r in g t h is r el ea se cycl e.

  Wh il e I ch eer f u l l y sh a r e t h e cr edit f or t h e a ccu r a t e a n d edu ca t ion a l a spect s of t h is book, t h e mist a kes a n d omission s I h a ve t o cl a im a s min e a l on e. Pl ea se br in g t h em t o my a t t en t ion so t h a t t h ey ca n be cor r ect ed in su bsequ en t pr in t in gs a n d edit ion s. I a m a s gr a t ef u l a s ever t o r ea der s wh o h a ve don e so in t h e pa st , a n d impr oved t h is book in t h e pr ocess.

  Int r o duc t io n

  Visu a l C++ is a power f u l a n d compl ex t ool f or bu il din g 32-bit a ppl ica t ion s f or Win dow 95 a n d Win dows NT. Th ese a ppl ica t ion s a r e mu ch l a r ger a n d mor e compl ex t h a n t h eir pr edecessor s f or 16-bit Win dows or ol der pr ogr a ms t h a t didn 't u se a gr a ph ica l u ser in t er f a ce. Yet , a s pr ogr a m siz e a n d compl exit y h a s in cr ea sed, pr ogr a mmer ef f or t h a s decr ea sed, a t l ea st f or pr ogr a mmer s wh o a r e u sin g t h e r igh t t ool s.

  Visu a l C++ is on e of t h e r igh t t ool s. Wit h it s code-gen er a t in g wiz a r ds, it ca n pr odu ce t h e sh el l of a wor kin g Win dows a ppl ica t ion in secon ds. Th e cl a ss l ibr a r y in cl u ded wit h Visu a l C++, t h e Micr osof t Fou n da t ion Cl a sses (MFC), h a s become t h e in du st r y st a n da r d f or Win dows sof t wa r e devel opmen t in a va r iet y of C++ compil er s. Th e visu a l edit in g t ool s ma ke l a you t of men u s a n d dia l ogs a sn a p. Th e t ime you in vest in l ea r n in g t o u se t h is pr odu ct wil l pa y f or it sel f on you r f ir st Win dows pr ogr a mmin g pr oject .

Who Should Read This Book?

  Th is book t ea ch es you h ow t o u se Visu a l C++ t o bu il d 32-bit Win dows a ppl ica t ion s, in cl u din g da t a ba se a ppl ica t ion s, In t er n et a ppl ica t ion s, a n d a ppl ica t ion s t h a t t a p t h e power of t h e Act iveX t ech n ol ogy. Th a t 's a t a l l or der , a n d t o f it a l l t h a t in l ess t h a n a t h ou sa n d pa ges, some t h in gs h a ve t o go. Th is book does n ot t ea ch you t h e f ol l owin g:

  The C++ programming language : You sh ou l d a l r ea dy be f a mil ia r wit h C++. Appen dix

  A, "C++ Review a n d Object -Or ien t ed Con cept s," is a r eview f or t h ose wh ose C++ skil l s n eed a boost .

  How to use Windows applications

  : You sh ou l d be a pr of icien t Win dows u ser , a bl e t o r esiz e a n d move win dows, dou bl e-cl ick, a n d r ecogn iz e f a mil ia r t ool ba r bu t t on s, f or exa mpl e.

  How to use Visual C++ as a C compiler

  : If you a l r ea dy wor k in C, you ca n u se Visu a l C++ a s you r compil er , bu t n ew devel oper s sh ou l d t a ke t h e pl u n ge in t o C++.

  Windows programming without MFC

  : Th is, t oo, is oka y f or t h ose wh o kn ow it , bu t n ot somet h in g t o l ea r n n ow t h a t MFC exist s.

  

The internals of ActiveX programming : Th is is r ef er r ed t o in t h e Act iveX ch a pt er s,

wh ich t el l you on l y wh a t you n eed t o kn ow t o ma ke it wor k.

  You sh ou l d r ea d t h is book if you f it on e of t h ese ca t egor ies: You kn ow some C++ a n d some Win dows pr ogr a mmin g t ech n iqu es a n d a r e n ew t o Visu a l C++. You wil l l ea r n t h e pr odu ct mu ch mor e qu ickl y t h a n you wou l d if you ju st t r ied wr it in g pr ogr a ms.

  You 've been wor kin g wit h pr eviou s ver sion s of Visu a l C++. Ma n y t imes u ser s l ea r n on e wa y t o do t h in gs a n d en d u p over l ookin g some of t h e n ewer pr odu ct ivit y f ea t u r es.

  You 've been wor kin g wit h Visu a l C++ 6 f or a wh il e a n d a r e begin n in g t o su spect you 'r e doin g t h in gs t h e h a r d wa y. Ma ybe you a r e.

  You wor k in Visu a l C++ 6 r egu l a r l y, a n d you n eed t o a dd a f ea t u r e t o you r pr odu ct . For t a sks l ike Hel p, pr in t in g, a n d t h r ea din g, you 'l l f in d a "h a n d u p" t o get st a r t ed.

  Before You Start Reading

  You n eed a copy of Visu a l C++ 6 a n d mu st h a ve it in st a l l ed. Th e in st a l l a t ion pr ocess is simpl e a n d ea sy t o f ol l ow, so it 's n ot cover ed in t h is book.

  Bef or e you bu y Visu a l C++ 6, you n eed a 32-bit Win dows oper a t in g syst em: Win dows 95, Win dows 98, or Win dows NT Ser ver or Wor kst a t ion . Th a t mea n s you r ma ch in e mu st be r ea son a bl y power f u l a n d moder n - sa y, a 486 or bet t er f or you r pr ocessor , a t l ea st 16MB of RAM a n d 500MB of disk spa ce, a n d a scr een t h a t ca n do 800 * 600 pixel displ a ys or even f in er r esol u t ion s. Th e il l u st r a t ion s in t h is book wer e a l l pr epa r ed a t a r esol u t ion of 800

  • 600 a n d, a s you wil l see, a t t imes t h in gs become a l it t l e cr owded. Th e sa mpl e code is a l l a va il a bl e on t h e Web, so f ol l owin g a l on g wil l be simpl er if you a l so h a ve a modem a n d a ccess t o t h e Web. Fin a l l y, you n eed t o ma ke a pr omise t o you r sel f - t h a t you wil l f ol l ow a l on g in Visu a l C++ a s you r ea d t h is book, cl ickin g a n d t ypin g a n d t r yin g t h in gs ou t . You don 't n eed t o t ype a l l t h e code if you don 't wa n t t o: It 's a l l on t h e Web sit e f or you t o l ook a t . However , you sh ou l d be r ea dy t o open t h e f il es a n d l ook a t t h e code a s you go.

What This Book Covers

  A t opic su ch a s Win dows pr ogr a mmin g in Visu a l C++ cover s a l ot of gr ou n d. Th is book con t a in s 28 ch a pt er s a n d 6 r ef er en ce a ppen dixes (A t o F). Be su r e t o l ook over t h e t it l es of t h e a ppen dixes n ow a n d t u r n t o t h em wh en ever you a r e u n su r e h ow t o do somet h in g. Th ey pr ovide va l u a bl e r ef er en ces f or t h e f ol l owin g:

  Appen dix A, "C++ Review a n d Object -Or ien t ed Con cept s," r emin ds you of t h e ba sics of t h e C++ l a n gu a ge a n d t h e pr in cipl es a n d ben ef it s of object -or ien t ed pr ogr a mmin g.

  Appen dix B, "Win dows Pr ogr a mmin g Review a n d a Look In side CWn d," cover s t h e specif ics of Win dows pr ogr a mmin g t h a t a r e n ow h idden f r om you by MFC cl a sses su ch a s CWn d.

  Appen dix C, "Th e Visu a l St u dio User In t er f a ce, Men u s, a n d Tool ba r s," expl a in s a l l t h e men u s, t ool ba r s, edit in g a r ea s on t h e scr een s, sh or t cu t s, a n d so on , t h a t ma ke u p t h e h igh l y compl ica t ed a n d r ich l y power f u l in t er f a ce bet ween you a n d Visu a l St u dio.

  Appen dix D, "Debu ggin g," expl a in s t h e ext r a men u s, win dows, t ool ba r s, a n d comma n ds in vol ved in debu ggin g a r u n n in g a ppl ica t ion .

  Appen dix E, "MFC Ma cr os a n d Gl oba l s," su mma r iz es t h e ma n y pr epr ocessor ma cr os a n d gl oba l va r ia bl es a n d f u n ct ion s spr in kl ed t h r ou gh ou t code gen er a t ed by t h e Devel oper St u dio wiz a r ds.

  ●

  Appen dix F, "Usef u l Cl a sses," descr ibes t h e cl a sses u sed t h r ou gh ou t t h e book t o ma n ipu l a t e da t es, st r in gs, a n d col l ect ion s of object s.

  Depen din g on you r ba ckgr ou n d a n d wil l in gn ess t o poke a r ou n d in men u s a n d t h e on l in e h el p, you migh t ju st skim t h ese a ppen dixes on ce a n d n ever r et u r n , or you migh t f il l t h em f u l l of bookma r ks a n d yel l ow st ickies. Al t h ou gh t h ey don 't l ea d you t h r ou gh t h e sa mpl e a ppl ica t ion s, t h ey wil l t ea ch you a l ot .

  Th e ma in st r ea m of t h e book is in Ch a pt er s 1 t h r ou gh 28. Ea ch ch a pt er t ea ch es you a n impor t a n t pr ogr a mmin g t a sk or somet imes t wo cl osel y r el a t ed t a sks, su ch a s bu il din g a t a skba r or a ddin g Hel p t o a n a ppl ica t ion . Det a il ed in st r u ct ion s sh ow you h ow t o bu il d a wor kin g a ppl ica t ion , or sever a l wor kin g a ppl ica t ion s, in ea ch ch a pt er .

  Th e f ir st n in e ch a pt er s cover con cept s f ou n d in a l most ever y Win dows a ppl ica t ion ; a f t er t h a t , t h e t a sks become l ess gen er a l . Her e's a br ief over view of some of t h e wor k t h a t is cover ed.

Dialogs and Controls

  Wh a t Win dows pr ogr a m does n ot h a ve a dia l og box? a n edit box? a bu t t on ? Dia l og boxes a n d con t r ol s a r e vit a l t o Win dows u ser in t er f a ces, a n d a l l of t h em, even t h e simpl e bu t t on or piece of st a t ic t ext , a r e win dows. Th e common con t r ol s en a bl e you t o t a ke a dva n t a ge of t h e l ea r n in g t ime u ser s h a ve devot ed t o ot h er pr ogr a ms a n d t h e pr ogr a mmin g t ime devel oper s h a ve pu t in on t h e oper a t in g syst em in or der t o u se t h e sa me Fil e Open dia l og box a s ever ybody el se, t h e sa me h ier a r ch ica l t r ee con t r ol , a n d so on . Lea r n mor e a bou t a l l t h ese con t r ol s in Ch a pt er s 2, "Dia l ogs a n d Con t r ol s," a n d 10, "Win dows 95 Common Con t r ol s."

Messages and Commands

  Messa ges f or m t h e h ea r t of Win dows pr ogr a mmin g. Wh en ever a n yt h in g h a ppen s on a Win dows ma ch in e, su ch a s a u ser cl ickin g t h e mou se or pr essin g a key, a messa ge is t r igger ed a n d sen t t o on e or mor e win dows, wh ich do somet h in g a bou t it . Visu a l C++ ma kes it ea sy f or you t o wr it e code t h a t ca t ch es t h ese messa ges a n d a ct s on t h em. Ch a pt er 3, "Messa ges a n d Comma n ds," expl a in s t h e con cept of messa ges a n d h ow MFC a n d ot h er a spect s of Visu a l C++ en a bl e you t o dea l wit h t h em.

The View/Document Paradigm

  A paradigm is a model , a wa y of l ookin g a t t h in gs. Th e design er s of MFC ch ose t o design t h e f r a mewor k ba sed on t h e a ssu mpt ion t h a t ever y pr ogr a m h a s somet h in g it wa n t s t o sa ve in a f il e. Th a t col l ect ion of in f or ma t ion is r ef er r ed t o a s t h e document. A view is on e wa y of l ookin g a t a docu men t . Th er e a r e ma n y a dva n t a ges t o sepa r a t in g t h e view a n d cl a sses f r om wh ich t o in h er it you r docu men t cl a ss a n d you r view cl a ss, so t h a t common pr ogr a mmin g t a sks su ch a s impl emen t in g scr ol l ba r s a r e n o l on ger you r pr obl em.

Drawing Onscreen

  No ma t t er h ow sma r t you r Win dows pr ogr a m is, if you ca n 't t el l t h e u ser wh a t 's goin g on by pu t t in g some wor ds or pict u r es on scr een , n o on e wil l kn ow wh a t t h e pr ogr a m h a s don e. A r ema r ka bl e a mou n t of t h e wor k is a u t oma t ica l l y don e by you r view cl a sses (on e of t h e a dva n t a ges of a dopt in g t h e docu men t /view pa r a digm), bu t a t t imes you h a ve t o do t h e dr a win g you r sel f . You l ea r n a bou t device con t ext s, scr ol l in g, a n d mor e in Ch a pt er 5, "Dr a win g on t h e Scr een ."

Printing on Paper

  Addin g pr in t in g ca pa bil it ies t o you r pr ogr a m is somet imes t h e simpl est t h in g in t h e wor l d beca u se t h e code you u se t o dr a w on scr een ca n be r eu sed t o dr a w on pa per . If mor e t h a n on e pa ge of in f or ma t ion is in vol ved, t h ou gh , t h in gs become t r icky. Ch a pt er 6, "Pr in t in g a n d Pr in t Pr eview," expl a in s a l l t h is, a s wel l a s ma ppin g modes, h ea der s a n d f oot er s, a n d mor e.

Persistence and File I/O

  Some good t h in gs a r e mea n t t o be on l y t empor a r y, su ch a s t h e displ a y of a ca l cu l a t or or a n on l in e ch a t win dow. However , most pr ogr a ms ca n sa ve t h eir docu men t s t o a f il e a n d open a n d l oa d t h a t f il e t o r e-cr ea t e a docu men t t h a t h a s been st or ed. MFC simpl if ies t h is by u sin g a r ch ives a n d ext en din g t h e u se of t h e st r ea m I/O oper a t or s >> a n d <<. You l ea r n a l l a bou t r ea din g a n d wr it in g t o f il es in Ch a pt er 7, "Per sist en ce a n d Fil e I/O."

ActiveX Programming

  Act iveX is t h e su ccessor t o OLE, a n d it 's t h e t ech n ol ogy t h a t f a cil it a t es commu n ica t ion bet ween a ppl ica t ion s a t t h e object l evel , en a bl in g you t o embed a Wor d docu men t in a n Excel spr ea dsh eet or t o embed a n y of h u n dr eds of kin ds of object s in a n y Act iveX a ppl ica t ion . Act iveX ch a pt er s in cl u de Ch a pt er s 13, "Act iveX Con cept s," 14, "Bu il din g a n Act iveX Con t a in er Appl ica t ion ," 15, "Bu il din g a n Act iveX Ser ver Appl ica t ion ," 16, "Bu il din g a n Au t oma t ion Ser ver ," a n d 17, "Bu il din g a n Act iveX Con t r ol ."

The Internet

  Micr osof t r ecogn iz es t h a t dist r ibu t ed compu t in g, in wh ich wor k is sh a r ed bet ween t wo or mor e compu t er s, is becomin g mor e a n d mor e common . Pr ogr a ms n eed t o t a l k t o ea ch ot h er , peopl e n eed t o sen d messa ges a cr oss a LAN or a r ou n d t h e wor l d, a n d MFC h a s cl a sses t h a t su ppor t t h ese kin ds of commu n ica t ion . Th e f ou r In t er n et ch a pt er s in t h is book a r e Ch a pt er 18, "Socket s, MAPI, a n d t h e In t er n et ," Ch a pt er 19, "In t er n et Pr ogr a mmin g wit h t h e Win In et Cl a sses," Ch a pt er 20, "Bu il din g a n In t er n et Act iveX Con t r ol ," a n d Ch a pt er 21, "Th e Act ive Templ a t e Libr a r y."

Database Access

  Da t a ba se pr ogr a mmin g keeps get t in g ea sier . ODBC, Micr osof t 's Open Da t a Ba se Con n ect ivit y pa cka ge, en a bl es you r code t o ca l l API f u n ct ion s t h a t a ccess a h u ge va r iet y of da t a ba se f il es - Or a cl e, DBa se, a n Excel spr ea dsh eet , a pl a in t ext f il e, ol d l ega cy ma in f r a me syst ems u sin g SQL, wh a t ever ! You ca l l a st a n da r d n a me f u n ct ion , a n d t h e API pr ovided by t h e da t a ba se ven dor or a t h ir d pa r t y h a n dl es t h e t r a n sl a t ion . Th e det a il s a r e in Ch a pt er s 22, "Da t a ba se Access," a n d 23, "SQL a n d t h e En t er pr ise Edit ion ."

Advanced Material

  For devel oper s wh o h a ve ma st er ed t h e ba sics, t h is book f ea t u r es some a dva n ced ch a pt er s t o move you r pr ogr a mmin g skil l s f or wa r d. You wil l l ea r n h ow t o pr even t memor y l ea ks, f in d bot t l en ecks, a n d l oca t e bu gs in you r code wit h t h e t ech n iqu es discu ssed in Ch a pt er 24, "Impr ovin g You r Appl ica t ion 's Per f or ma n ce." Reu se is a h u gel y popu l a r con cept in sof t wa r e devel opmen t a t t h e momen t , especia l l y wit h ma n a ger s wh o see a ch a n ce t o l ower t h eir devel opmen t bu dget . If you 'd l ike t o wr it e r eu sa bl e code a n d compon en t s, Ch a pt er 25, "Ach ievin g Reu se wit h t h e Ga l l er y a n d You r Own AppWiz a r ds," wil l t a ke you t h er e.

  Of t en C++ pr ogr a mmer s a r e so bu sy l ea r n in g t h e ba sics of h ow t o ma ke pr ogr a ms wor k t h a t t h ey miss t h e f ea t u r es t h a t ma ke C++ t r u l y power f u l . You wil l l ea r n in Ch a pt er 26, "Except ion s a n d Templ a t es," h ow t o ca t ch er r or s ef f icien t l y a n d h ow t o u se on e set of code in ma n y dif f er en t sit u a t ion s.

  As u ser dema n ds f or h igh -per f or ma n ce sof t wa r e con t in u e t o mu l t ipl y, devel oper s mu st l ea r n en t ir el y n ew t ech n iqu es t o pr odu ce power f u l a ppl ica t ion s t h a t pr ovide f a st r espon se t imes. For ma n y devel oper s, wr it in g mu l t it h r ea ded a ppl ica t ion s is a vit a l t ech n iqu e. Lea r n a bou t t h r ea din g in Ch a pt er 27, "Mu l t it a skin g wit h Win dows Th r ea ds." Ch a pt er 28, "Fu t u r e Expl or a t ion s," in t r odu ces you t o t opics t h a t a r e def in it el y n ot f or begin n er s. Lea r n h ow t o cr ea t e con sol e a ppl ica t ion s, u se a n d bu il d you r own DLLs, a n d wor k wit h Un icode.

  Conventions Used in This Book

  On e t h in g t h is book h a s pl en t y of is code. Somet imes you n eed t o see on l y a l in e or t wo, so t h e code is mixed in wit h t h e t ext , l ike t h is: int SomeFunction( int x, int y); { return x+y; } You ca n t el l t h e dif f er en ce bet ween code a n d r egu l a r t ext by t h e f on t s u sed f or ea ch .

  Somet imes, you 'l l see a piece of code t h a t 's t oo l a r ge t o mix in wit h t h e t ext : You wil l f in d a n exa mpl e in List in g 0.1.

  Listing 0.1 CHostDialog dialog(m_pMainWnd); if (dialog.DoModal() == IDOK) { AppSocket = new CSocket(); if (AppSocket->Connect(dialog.m_hostname,119)) { while (AppSocket->GetStatus() == CONNECTING) { YieldControl(); } if (AppSocket->GetStatus() == CONNECTED) { CString response = AppSocket->GetLine(); SocketAvailable = TRUE; } } } if (!SocketAvailable) { AfxMessageBox("Can't connect to server. Please ¬ quit.",MB_OK|MB_ICONSTOP); }

  Th e ch a r a ct er on t h e n ext -t o-l a st l in e (¬) is ca l l ed t h e code continuation character. It in dica t es a pl a ce wh er e a l in e of code h a d t o be br oken t o f it it on t h e pa ge, bu t in r ea l it y t h e l in e does n ot br ea k t h er e. If you 'r e t ypin g code f r om t h e book, don 't br ea k t h e l in e t h er e - keep goin g. If you 'r e r ea din g a l on g in code t h a t wa s gen er a t ed f or you by Visu a l C++, don 't be con f u sed wh en t h e l in e does n ot br ea k t h er e.

  Remember , t h e code is in t h e book so t h a t you ca n u n der st a n d wh a t 's goin g on , n ot f or you t o t ype it . Al l t h e code is on t h e compa n ion Web sit e a s wel l . Somet imes you wil l wor k you r wa y t h r ou gh t h e devel opmen t of a n a ppl ica t ion a n d see sever a l ver sion s of a bl ock of code a s you go - t h e f in a l ver sion is on t h e Web sit e. You 'l l f in d t h e sit e by goin g t o . kn ow a bou t .

  NOTE:

  Th is is a Not e: It expl a in s a su bt l e bu t impor t a n t poin t . Don 't skip Not es, even if you 'r e t h e kin d wh o skips Tips. n

  CAUTION: Th is is a Ca u t ion , a n d it 's ser iou s. It wa r n s you of t h e h or r ibl e

  con sequ en ces if you ma ke a f a l se st ep, so be su r e t o r ea d a l l of t h ese t h a t you come a cr oss.

  Wh en a wor d is bein g def in ed or emph a siz ed, it 's in italic. Th e n a mes of va r ia bl es, f u n ct ion s, a n d C++ cl a sses a r e a l l in mon ospa ced f on t . In t er n et URLS a n d t h in gs you sh ou l d t ype a r e in bo l d. Remember , a n URL n ever en ds wit h pu n ct u a t ion , so ign or e a n y comma or per iod a f t er t h e URL.

Time to Get Started

  Th a t a bou t wr a ps u p t h in gs f or t h e in t r odu ct ion . You 've l ea r n ed wh a t you n eed t o get st a r t ed, in cl u din g some a dva n ced wa r n in g a bou t t h e n ot a t ion s u sed t h r ou gh ou t t h e book. Ju mp r igh t in , l ea r n a l l a bou t wr it in g Win dows a ppl ica t ion s wit h MFC, a n d t h en get st a r t ed on some devel opmen t of you r own ! Good l u ck a n d h a ve f u n .

  © Copyr igh t Ma cmil l a n Compu t er Pu bl ish in g. Al l r igh t s r eser ved.

  

  

Special Edition Using Visual C++ 6

  • - 1 -

    Building Your First Windows Application

  

  ●

Creating a Windows Application

  Visu a l C++ does n ot ju st compil e code; it gen er a t es code. You ca n cr ea t e a Win dows a ppl ica t ion in min u t es wit h a t ool ca l l ed AppWiz a r d. In t h is ch a pt er you 'l l l ea r n h ow t o t el l AppWiz a r d t o ma ke you a st a r t er a pp wit h a l l t h e Win dows boil er pl a t e code you wa n t . AppWiz a r d is a ver y ef f ect ive t ool . It copies in t o you r a ppl ica t ion t h e code t h a t a l most a l l Win dows a ppl ica t ion s r equ ir e. Af t er a l l , you a r en 't t h e f ir st pr ogr a mmer t o n eed a n a ppl ica t ion wit h r esiz a bl e edges, min imiz e a n d ma ximiz e bu t t on s, a Fil e men u wit h Open , Cl ose, Pr in t Set u p, Pr in t , a n d Exit opt ion s, a r e you ? AppWiz a r d ca n ma ke ma n y kin ds of a ppl ica t ion s, bu t wh a t most peopl e wa n t , a t l ea st a t f ir st , is a n execu t a bl e (.exe) pr ogr a m. Most peopl e a l so wa n t AppWiz a r d t o pr odu ce boil er pl a t e code - t h e cl a sses, object s, a n d f u n ct ion s t h a t h a ve t o be in ever y pr ogr a m. To cr ea t e a pr ogr a m l ike t h is, Ch oose Fil e, New a n d cl ick t h e Pr oject s t a b in t h e New dia l og box, a s sh own in Figu r e 1.1.

  

The Projects tab of the New dialog box is where you choose the kind of application you want

to build.

  Ch oose MFC AppWiz a r d (EXE) f r om t h e l ist box on t h e l ef t , f il l in a pr oject n a me, a n d cl ick OK. AppWiz a r d wil l wor k t h r ou gh a n u mber of st eps. At ea ch st ep, you ma ke a decision a bou t wh a t kin d of a ppl ica t ion you wa n t a n d t h en cl ick Next . At a n y t ime, you ca n cl ick Ba ck t o r et u r n t o a pr eviou s decision , Ca n cel t o a ba n don t h e wh ol e pr ocess, Hel p f or mor e det a il s, or Fin ish t o skip t o t h e en d a n d cr ea t e t h e a ppl ica t ion wit h ou t a n swer in g a n y mor e qu est ion s (n ot r ecommen ded bef or e t h e l a st st ep). Th e f ol l owin g sect ion s expl a in ea ch st ep.

  NOTE: An MFC a ppl ica t ion u ses MFC, t h e Micr osof t Fou n da t ion Cl a sses.

  You wil l l ea r n mor e a bou t MFC t h r ou gh ou t t h is book.

  Deciding How Many Documents the Application Supports

  Th e f ir st decision t o commu n ica t e t o AppWiz a r d, a s sh own in Figu r e 1.2, is wh et h er you r a ppl ica t ion sh ou l d be MDI, SDI, or dia l og ba sed. AppWiz a r d gen er a t es dif f er en t code a n d cl a sses f or ea ch of t h ese a ppl ica t ion t ypes.

   The first step in building a typical application with AppWizard is choosing the interface.

  Th e t h r ee a ppl ica t ion t ypes t o ch oose f r om a r e a s f ol l ows: A single document interface (SDI) a ppl ica t ion , su ch a s Not epa d, h a s on l y on e docu men t open a t a t ime. Wh en you ch oose Fil e, Open , t h e cu r r en t l y open f il e is cl osed bef or e t h e n ew on e is open ed. A multiple document interface (MDI) a ppl ica t ion , su ch a s Excel or Wor d, ca n open ma n y docu men t s (t ypica l l y f il es) a t on ce. Th er e is a Win dow men u a n d a Cl ose it em on t h e Fil e men u . It 's a qu ir k of MFC t h a t if you l ike mu l t ipl e views on a sin gl e docu men t , you mu st bu il d a n MDI a ppl ica t ion . A dialog-based a ppl ica t ion , su ch a s t h e Ch a r a ct er Ma p u t il it y t h a t comes wit h Win dows a n d is sh own in Figu r e 1.3, does n ot h a ve a docu men t a t a l l . Th er e a r e n o men u s. (If you 'd l ike t o see Ch a r a ct er Ma p in a ct ion , it 's u su a l l y in t h e Accessor ies f ol der , r ea ch ed by cl ickin g St a r t . You ma y n eed t o in st a l l it by u sin g Add/Remove pr ogr a ms u n der Con t r ol Pa n el .)

   Character Map is a dialog-based application.

  As you ch a n ge t h e r a dio bu t t on sel ect ion , t h e pict u r e on t h e l ef t of t h e scr een ch a n ges t o demon st r a t e h ow t h e a ppl ica t ion a ppea r s if you ch oose t h is t ype of a ppl ica t ion .

  NOTE:: Dia l og-ba sed a ppl ica t ion s a r e qu it e dif f er en t f r om MDI or SDI

  a ppl ica t ion s. Th e AppWiz a r d dia l ogs a r e dif f er en t wh en you 'r e cr ea t in g a dia l og-ba sed a ppl ica t ion . Th ey a r e pr esen t ed l a t er in t h e sect ion "Cr ea t in g a Dia l og-Ba sed Appl ica t ion ."

  Ben ea t h t h ese ch oices is a ch eckbox f or you t o in dica t e wh et h er you wa n t su ppor t f or t h e Docu men t /View a r ch it ect u r e. Th is f r a mewor k f or you r a ppl ica t ion s is expl a in ed in Ch a pt er 4, "Docu men t s a n d Views." Exper ien ced Visu a l C++ devel oper s, especia l l y t h ose wh o a r e por t in g a n a ppl ica t ion f r om a n ot h er devel opmen t syst em, migh t ch oose t o t u r n of f t h is su ppor t . You sh ou l d l ea ve t h e opt ion sel ect ed.

  Lower on t h e scr een is a dr op-down box t o sel ect t h e l a n gu a ge f or you r r esou r ces. If you h a ve set you r syst em l a n gu a ge t o a n yt h in g ot h er t h a n t h e def a u l t , En gl ish [Un it ed en cou n t er u n expect ed beh a vior f r om Cl a ssWiz a r d l a t er . (Of cou r se, if you r a ppl ica t ion is f or u ser s wh o wil l h a ve t h eir l a n gu a ge set t o U.S. En gl ish , you migh t n ot h a ve a ch oice. In t h a t ca se, ch a n ge you r syst em l a n gu a ge u n der Con t r ol Pa n el .) Cl ick Next a f t er you ma ke you r ch oices.

Databases

  Th e secon d st ep in cr ea t in g a n execu t a bl e Win dows pr ogr a m wit h AppWiz a r d is t o ch oose t h e l evel of da t a ba se su ppor t , a s sh own in Figu r e 1.4.

   The second step to building a typical application with AppWizard is to set the database options you will use.

  Th er e a r e f ou r ch oices f or da t a ba se su ppor t : If you a r en 't wr it in g a da t a ba se a ppl ica t ion , ch oose Non e.

  If you wa n t t o h a ve a ccess t o a da t a ba se bu t don 't wa n t t o der ive you r view f r om CFor mView or h a ve a Recor d men u , ch oose Hea der Fil es On l y.

  If you wa n t t o der ive you r view f r om CFor mView a n d h a ve a Recor d men u bu t don 't n eed t o ser ia l iz e a docu men t , ch oose Da t a ba se View Wit h ou t Fil e Su ppor t . You ca n u pda t e da t a ba se r ecor ds wit h CRecor dset , a n MFC cl a ss discu ssed in mor e det a il in Ch a pt er 22, "Da t a ba se Access." If you wa n t t o su ppor t da t a ba ses a s in t h e pr eviou s opt ion bu t a l so n eed t o sa ve a docu men t on disk (per h a ps some u ser opt ion s), ch oose Da t a ba se View Wit h Fil e Su ppor t . Ch a pt er 22 cl a r if ies t h ese ch oices a n d demon st r a t es da t a ba se pr ogr a mmin g wit h MFC. If you ch oose t o h a ve a da t a ba se view, you mu st specif y a da t a sou r ce n ow. Cl ick t h e Da t a Sou r ce bu t t on t o set t h is u p. As you sel ect dif f er en t r a dio bu t t on s, t h e pict u r e on t h e l ef t ch a n ges t o sh ow you t h e r esu l t s of you r ch oice. Cl ick Next t o move t o t h e n ext st ep.

Compound Document Support

  Th e t h ir d st ep in r u n n in g AppWiz a r d t o cr ea t e a n execu t a bl e Win dows pr ogr a m is t o decide on t h e a mou n t of compou n d docu men t su ppor t you wa n t t o in cl u de, a s sh own in Figu r e 1.5. OLE (object l in kin g a n d embeddin g) h a s been of f icia l l y r en a med Act iveX t o cl a r if y t h e r ecen t t ech n ol ogy sh if t s, most of wh ich a r e h idden f r om you by MFC. Act iveX a n d OLE t ech n ol ogy a r e join t l y r ef er r ed t o a s compound document technology.

   The third step of building a typical application with AppWizard is to set the compound document support you will need.

  Th er e a r e f ive ch oices f or compou n d docu men t su ppor t : If you a r e n ot wr it in g a n Act iveX a ppl ica t ion , ch oose Non e.

  If you wa n t you r a ppl ica t ion t o con t a in embedded or l in ked Act iveX object s, su ch a s Wor d docu men t s or Excel wor ksh eet s, ch oose Con t a in er . You l ea r n t o bu il d a n Act iveX con t a in er in Ch a pt er 14, "Bu il din g a n Act iveX Con t a in er Appl ica t ion ." If you wa n t you r a ppl ica t ion t o ser ve object s t h a t ca n be embedded in ot h er a ppl ica t ion s, bu t it n ever n eeds t o r u n a s a st a n da l on e a ppl ica t ion , ch oose Min i Ser ver .

  If you r a ppl ica t ion ser ves docu men t s a n d a l so f u n ct ion s a s a st a n da l on e a ppl ica t ion , ch oose Fu l l Ser ver . In Ch a pt er 15, "Bu il din g a n Act iveX Ser ver Appl ica t ion ," you l ea r n t o bu il d a n Act iveX f u l l ser ver .

  If you wa n t you r a ppl ica t ion t o h a ve t h e ca pa bil it y t o con t a in object s f r om ot h er a ppl ica t ion s a n d a l so t o ser ve it s object s t o ot h er a ppl ica t ion s, ch oose Bot h Con t a in er a n d Ser ver .

  If you ch oose t o su ppor t compou n d docu men t s, you ca n a l so su ppor t compound files. Compou n d f il es con t a in on e or mor e Act iveX object s a n d a r e sa ved in a specia l wa y so t h a t on e of t h e object s ca n be ch a n ged wit h ou t r ewr it in g t h e wh ol e f il e. Th is spa r es you a gr ea t dea l of t ime. Use t h e r a dio bu t t on s in t h e middl e of t h is St ep 3 dia l og box t o sa y Yes, Pl ea se, or No, Th a n k You t o compou n d f il es.

  If you wa n t you r a ppl ica t ion t o su r r en der con t r ol t o ot h er a ppl ica t ion s t h r ou gh a u t oma t ion , ch eck t h e Au t oma t ion ch eck box. (Au t oma t ion is t h e su bject of Ch a pt er 16, "Bu il din g a n Au t oma t ion Ser ver .") If you wa n t you r a ppl ica t ion t o u se Act iveX con t r ol s, sel ect t h e Act iveX Con t r ol s ch eck box. Cl ick Next t o move t o t h e n ext st ep.

  NOTE:

  If you wa n t you r a ppl ica t ion t o be a n Act iveX con t r ol , you don 't cr ea t e a t ypica l .exe a ppl ica t ion a s descr ibed in t h is sect ion . Cr ea t in g Act iveX con t r ol s wit h t h e Act iveX Con t r ol Wiz a r d is cover ed in Ch a pt er 17, "Bu il din g a n Act iveX Con t r ol ."

  Appearance and Other Options

  Th e f ou r t h st ep in r u n n in g AppWiz a r d t o cr ea t e a n execu t a bl e Win dows pr ogr a m (see Figu r e 1.6) is t o det er min e some of t h e in t er f a ce a ppea r a n ce opt ion s f or you r a ppl ica t ion . Th is St ep 4 dia l og box con t a in s a n u mber of in depen den t ch eck boxes. Ch eck t h em if you wa n t a f ea t u r e; l ea ve t h em u n ch ecked if you don 't .

   The fourth step of building a typical application with AppWizard is to set some interface options.

  Th e f ol l owin g a r e t h e opt ion s t h a t a f f ect you r in t er f a ce's a ppea r a n ce:

  Docking Toolbar

  . AppWiz a r d set s u p a t ool ba r f or you . You ca n edit it t o r emove u n wa n t ed bu t t on s or t o a dd n ew on es l in ked t o you r own men u it ems. Th is is descr ibed in Ch a pt er 9, "St a t u s Ba r s a n d Tool ba r s."

  Initial Status Bar

  . AppWiz a r d cr ea t es a st a t u s ba r t o displ a y men u pr ompt s a n d ot h er messa ges. La t er , you ca n wr it e code t o a dd in dica t or s a n d ot h er el emen t s t o t h is ba r , a s descr ibed in Ch a pt er 9.

  Printing and Print Preview

  . You r a ppl ica t ion wil l h a ve Pr in t a n d Pr in t Pr eview opt ion s on t h e Fil e men u , a n d mu ch of t h e code you n eed in or der t o impl emen t pr in t in g wil l be gen er a t ed by AppWiz a r d. Ch a pt er 6, "Pr in t in g a n d Pr in t Pr eview," discu sses t h e r est .

  Context-Sensitive Help

  . You r Hel p men u wil l ga in In dex a n d Usin g Hel p opt ion s, a n d some of t h e code n eeded t o impl emen t Hel p wil l be pr ovided by AppWiz a r d. Th is decision is h a r d t o ch a n ge l a t er beca u se qu it e a l ot of code is a dded in dif f er en t pl a ces wh en impl emen t in g Con t ext -Sen sit ive Hel p. Ch a pt er 11, "Hel p," descr ibes Hel p impl emen t a t ion .

  3D Controls

  . You r a ppl ica t ion wil l l ook l ike a t ypica l Win dows 95 a ppl ica t ion . If you don 't sel ect t h is opt ion , you r dia l og boxes wil l h a ve a wh it e ba ckgr ou n d, a n d t h er e wil l be n o sh a dows a r ou n d t h e edges of edit boxes, ch eck boxes, a n d ot h er con t r ol s.

  MAPI(Messaging API)

  . You r a ppl ica t ion wil l be a bl e t o u se t h e Messa gin g API t o sen d f a x, ema il , or ot h er messa ges. Ch a pt er 18, "Socket s, MAPI, a n d t h e In t er n et ," discu sses t h e Messa gin g API.

  Windows

  Sockets. You r a ppl ica t ion ca n a ccess t h e In t er n et dir ect l y, u sin g pr ot ocol s l ike FTP a n d HTTP (t h e Wor l d Wide Web pr ot ocol ). Ch a pt er 18 discu sses socket s. You ca n pr odu ce In t er n et pr ogr a ms wit h ou t en a bl in g socket su ppor t if you u se t h e n ew Win In et cl a sses, discu ssed in Ch a pt er 19, "In t er n et Pr ogr a mmin g wit h t h e Win In et Cl a sses." Wor d or Visu a l C++ it sel f , or wit h t ool ba r s l ike t h ose in In t er n et Expl or er . You ca n r ea d mor e a bou t t h is in Ch a pt er 9.

  You ca n a l so set h ow ma n y f il es you wa n t t o a ppea r on t h e r ecen t f il e l ist f or t h is a ppl ica t ion . Fou r is t h e st a n da r d n u mber ; ch a n ge it on l y if you h a ve good r ea son t o do so. Cl ickin g t h e Adva n ced bu t t on a t t h e bot t om of t h is St ep 4 dia l og box br in gs u p t h e Adva n ced Opt ion s dia l og box, wh ich h a s t wo t a bs. Th e Docu men t Templ a t e St r in gs t a b is sh own in Figu r e 1.7. AppWiz a r d bu il ds ma n y n a mes a n d pr ompt s f r om t h e n a me of you r a ppl ica t ion , a n d somet imes it n eeds t o a bbr evia t e you r a ppl ica t ion n a me. Un t il you a r e f a mil ia r wit h t h e n a mes AppWiz a r d bu il ds, you sh ou l d ch eck t h em on t h is Docu men t Templ a t e St r in gs dia l og box a n d a dju st t h em, if n ecessa r y. You ca n a l so ch a n ge t h e ma in f r a me ca pt ion , wh ich a ppea r s in t h e t it l e ba r of you r a ppl ica t ion . Th e f il e ext en sion , if you ch oose on e, wil l be in cor por a t ed in t o f il en a mes sa ved by you r a ppl ica t ion a n d wil l r est r ict t h e f il es in it ia l l y displ a yed wh en t h e u ser ch ooses Fil e, Open .

  Th e Win dow St yl es t a b is sh own in Figu r e 1.8. Her e you ca n ch a n ge t h e a ppea r a n ce of you r a ppl ica t ion qu it e dr a ma t ica l l y. Th e f ir st ch eck box, Use Spl it Win dow, a dds a l l t h e code n eeded t o impl emen t spl it t er win dows l ike t h ose in t h e code edit or of Devel oper St u dio. Th e r ema in der of t h e Win dow St yl es dia l og box set s t h e a ppea r a n ce of you r main

  frame

  a n d, f or a n MDI a ppl ica t ion , of you r MDI child frames. Fr a mes h ol d win dows; t h e syst em men u , t it l e ba r , min imiz e a n d ma ximiz e boxes, a n d win dow edges a r e a l l f r a me pr oper t ies. Th e ma in f r a me h ol ds you r en t ir e a ppl ica t ion . An MDI a ppl ica t ion h a s a n u mber of MDI ch il d f r a mes - on e f or ea ch docu men t win dow, in side t h e ma in f r a me.

  The Document Template Strings tab of the Advanced Options dialog box lets you adjust the way names are abbreviated.

  

The Window Styles tab of the Advanced Options dialog box lets you adjust the appearance of

your windows.

  Her e a r e t h e pr oper t ies you ca n set f or f r a mes:

  Thick Frame

  . Th e f r a me h a s a visibl y t h ick edge a n d ca n be r esiz ed in t h e u su a l Win dows wa y. Un ch eck t h is t o pr even t r esiz in g.

  Minimize Box . Th e f r a me h a s a min imiz e box in t h e t op-r igh t cor n er . Maximize Box . Th e f r a me h a s a ma ximiz e box in t h e t op-r igh t cor n er . System Menu . Th e f r a me h a s a syst em men u in t h e t op-l ef t cor n er .

  Minimized.

  Th e f r a me is min imiz ed wh en t h e a ppl ica t ion st a r t s. For SDI a ppl ica t ion s,

   t h is opt ion wil l be ign or ed wh en t h e a ppl ica t ion is r u n n in g u n der Win dows 95.

  Maximized

  . Th e f r a me is ma ximiz ed wh en t h e a ppl ica t ion st a r t s. For SDI a ppl ica t ion s, t h is opt ion wil l be ign or ed wh en t h e a ppl ica t ion is r u n n in g u n der Win dows 95. Wh en you h a ve ma de you r sel ect ion s, cl ick Cl ose t o r et u r n t o st ep 4 a n d cl ick Next t o move on t o t h e n ext st ep.

Other Options

  Th e f if t h st ep in r u n n in g AppWiz a r d t o cr ea t e a n execu t a bl e Win dows pr ogr a m (see Figu r e 1.9) a sks t h e l ef t over qu est ion s t h a t a r e u n r el a t ed t o men u s, OLE, da t a ba se a ccess, or a ppea r a n ce. Do you wa n t commen t s in ser t ed in you r code? You cer t a in l y do.

  Th a t on e is ea sy.

  The fifth step of building an application with AppWizard is to decide on comments and the MFC library.

  Th e n ext qu est ion isn 't a s st r a igh t f or wa r d. Do you wa n t t h e MFC l ibr a r y a s a sh a r ed DLL or st a t ica l l y l in ked? A DLL (dyn a mic l in k l ibr a r y) is a col l ect ion of f u n ct ion s u sed by ma n y dif f er en t a ppl ica t ion s. Usin g a DLL ma kes you r pr ogr a ms sma l l er bu t ma kes t h e in st a l l a t ion a l it t l e mor e compl ex. Ha ve you ever moved a n execu t a bl e t o a n ot h er dir ect or y, or a n ot h er compu t er , on l y t o f in d it won 't r u n a n ymor e beca u se it 's missin g DLLs? If you st a t ica l l y l in k t h e MFC l ibr a r y in t o you r a ppl ica t ion , it is l a r ger , bu t it is ea sier t o move a n d copy a r ou n d.

  If you r u ser s a r e l ikel y t o be devel oper s t h emsel ves a n d own a t l ea st on e ot h er a ppl ica t ion t h a t u ses t h e MFC DLL or a r en 't in t imida t ed by t h e n eed t o in st a l l DLLs a s wel l a s t h e pr ogr a m it sel f , ch oose t h e sh a r ed DLL opt ion . Th e sma l l er execu t a bl e is con ven ien t f or a l l . If you r u ser s a r e n ot devel oper s, ch oose t h e st a t ica l l y l in ked opt ion . It r edu ces t h e t ech n ica l su ppor t issu es you h a ve t o f a ce wit h in exper ien ced u ser s. If you wr it e a good in st a l l pr ogr a m, you ca n f eel mor e con f iden t a bou t u sin g sh a r ed DLLs.

  Af t er you 've ma de you r St ep 5 ch oices, cl ick Next t o move t o St ep 6.

Filenames and Classnames

  Th e f in a l st ep in r u n n in g AppWiz a r d t o cr ea t e a n execu t a bl e Win dows pr ogr a m is t o con f ir m t h e cl a ssn a mes a n d t h e f il en a mes t h a t AppWiz a r d cr ea t es f or you , a s sh own in Figu r e 1.10. AppWiz a r d u ses t h e n a me of t h e pr oject (Fir st SDI in t h is exa mpl e) t o bu il d t h e cl a ssn a mes a n d f il en a mes. You sh ou l d n ot n eed t o ch a n ge t h ese n a mes. If you r def a u l t is CView, bu t ma n y devel oper s pr ef er t o u se a n ot h er view, su ch a s CScr ol l View or CEdit View. Th e view cl a sses a r e discu ssed in Ch a pt er 4. Cl ick Fin ish wh en t h is St ep 6 dia l og box is compl et e.

  TIP:

  Object s, cl a sses, a n d in h er it a n ce a r e r eviewed in Appen dix A, "C++ Review a n d Object -Or ien t ed Con cept s."

  

The final step of building a typical application with AppWizard is to confirm filenames and

classnames.

Creating the Application

  Af t er you cl ick Fin ish , AppWiz a r d sh ows you wh a t is goin g t o be cr ea t ed in a dia l og box, simil a r t o Figu r e 1.11. If a n yt h in g h er e is wr on g, cl ick Ca n cel a n d wor k you r wa y ba ck t h r ou gh AppWiz a r d wit h t h e Ba ck bu t t on s u n t il you r ea ch t h e dia l og box you n eed t o ch a n ge. Move f or wa r d wit h Next , Fin ish ; r eview t h is dia l og box a ga in ; a n d cl ick OK t o a ct u a l l y cr ea t e t h e a ppl ica t ion . Th is t a kes a f ew min u t es, wh ich is h a r dl y su r pr isin g beca u se h u n dr eds of code l in es, men u s, dia l og boxes, h el p t ext , a n d bit ma ps a r e bein g gen er a t ed f or you in a s ma n y a s 20 f il es. Let it wor k.

  When AppWizard is ready to build your application, you get one more chance to confirm everything.