Perclien: Client of Persistent Components

Click to open or copy the Perclien project files.

Click to open or copy the Include files (required).

Click to open or copy the Library files (required).

Note   To run this sample, you must first build the Perserve, Pertext, and Perdraw server samples.

The Perclien sample completes a sequence of four samples that cover persistent COM objects. The first three samples discuss three COM servers that each house COM objects having a different kind of object persistence.  The first sample, Perserve, shows how to use the IPersistStream interface to give COPageList COM objects their persistence in a stream of a structured storage compound file.  The second sample, Pertext, shows how to use the IPersistStreamInit interface to give COTextPage COM objects their persistence in streams. The IPersistStreamInit::InitNew method is covered in detail. The third sample, Perdraw, shows how to use the IPersistStorage interface to give CODrawPage COM objects their persistence in substorages of a compound file. The IPersistStorage::HandsOffStorage and IPersistStorage::SaveCompleted methods are covered in detail. This sample, Perclien, integrates the use of the three previous servers into a single COM client application.

The Perclien client uses the components in Perserve, Pertext, and Perdraw to build a document-editing application that presents a list of pages to users. The user can add, delete, open, and name the page items in the list. When an item is opened, the content appears in a separate window for editing. The separate edit windows are child windows of Perclien's main window. Two types of pages are supported: text pages and drawing pages.

See the parent topic, COM Tutorial Samples, to download global tutorial files or any HTML files about this sample.

Building SDK Samples

This sample uses the following keywords:

_tsplitpath; addfmt; addopenitem; addref; advise; ansitouc; asksave; beginpaint; bringwindowtotop; cguidraw; cguilist; cguitext; checkmenuitem; choosecolor; cimpidrawpagesink; cimpipagelistsink; cimpitextpagesink; clear; cleared; clearwin; clistwin; closeopenitem; closeopenpages; closetextpages; cmainwindow; cocreateinstance; codrawpagesink; cofreeunusedlibraries; coinitialize; connectsink; copagelistsink; copyfile; cotextpagesink; couninitialize; cpagefile; create; createpen; createstorage; createstream; createwindowex; ctextwin; defined; defwindowproc; delete; delete_pointer; deleteobject; deleteopenitem; destroyelement; dialogproc; disconnectsink; dispatchmessage; docommand; editcopy; editcut; editdelete; editpaste; editselectall; editundo; enablemenuitem; enddialog; endpaint; errorbox; failed; fileexist; fillrect; findconnectionpoint; get; getclassbrush; getclientrect; getconnectionpoint; getcursel; getdc; getdlgitem; getdlgitemtext; gethwnd; getlasterror; getlength; getmenu; getmenustate; getmessage; getmodulefilename; getopenfilename; getopenitem; getsavefilename; getsizemax; getstockobject; getsystemmetrics; gettext; getusername; handsoffstorage; hrmsgid; initapplication; initeditmenu; initinstance; initnew; inkcolor; inkdraw; inksaving; inkstart; inkstop; inkwidth; insertfmt; isclipboardformatavailable; isdirty; iswindow; lineto; liset32; load; loadaccelerators; loadcursor; loaded; loadicon; loadimage; loadstring; loadstringa; lstrcat; lstrcpy; makefamilypath; makeintresource; memcpy; memset; messagebox; messageboxa; movetoex; movewindow; open; openstorage; openstream; openwin; pageadd; pageadded; pagechanged; pageclosed; pagedelete; pagedeleted; pageopen; pageset; pagetitle; paintwin; pickcolor; postmessage; postquitmessage; put; puttext; queryinterface; readclassstg; readclassstm; readhelp; readsource; readtutorial; redraw; registerclassex; release; release_interface; releasecapture; releaseopenpages; releasepage; renumber; renumopenitems; resize; resized; resizewin; restoreopenpages; restorepage; rgb; save; saveas; savecompleted; saved; saveopenpages; seek; selectobject; sendmessage; set; setcapture; setcursel; setcursor; setdlgitemtext; setfocus; setsize; setwindowtext; show; showdialog; showwindow; stdmethodimp_; stgcreatedocfile; stgisstoragefile; stgopenstorage; style; succeeded; text; topwin; translateaccelerator; translatemessage; uctoansi; unadvise; unicodeok; updatewindow; va_start; windowproc; winmain; writeclassstg; writeclassstm; wvsprintf