DOServer: Active Document Server

Click to open or copy the DOServer project files.

DOServer is a very simple example of an Active Document server. It implements the minimum number of interfaces required to have an object be an Active Document.

If the application is executed without the /EMBEDDING switch, a dialog box is displayed that has options for registering the server and creating a working file. When you select Register Server, the application makes all of the required entries into the registry to register the application as an Active Document server. You must do this at least once before attempting to load a working file into a container.

If the Create File option is selected, the user can create a new file that can be loaded into an Active Document container (such as Internet Explorer, Microsoft Office Binder or the Framer sample in this SDK).

This Active Document only implements a color feature. After the file is loaded into the container, the color can be selected from the Color menu that the server adds to the container menu.

Building SDK Samples

This sample demonstrates the following keywords:

activateinplace; activateme; activateui; addref; advise; applyviewstate; arraysize; beginpaint; bringwindowtotop; cclassfactory; cdataobject; centerwindow; cenumformatetc; checkmenuradioitem; checkradiobutton; close; closeview; cocreateinstance; cogetmalloc; coinitialize; coledocument; coledocumentview; coleinplaceactiveobject; coleinplaceobject; coleobject; colorhookproc; contextsensitivehelp; coregisterclassobject; corevokeclassobject; couninitialize; cpersistfile; cpersiststorage; createdataadviseholder; createdocwindow; createfile; createinstance; createmenu; createoleadviseholder; createsolidbrush; createstream; createstreams; createview; createviewwindow; createwindowex; dadvise; deactivateinplace; deactivateui; debugbreak; define_guid; defwindowproc; deleteobject; destroymenu; dialogbox; dispatchmessage; doverb; dunadvise; enablemodeless; enablewindow; enddialog; endpaint; enumadvise; enumdadvise; enumformatetc; enumverbs; enumviews; failed; fillrect; get_wm_command_cmd; get_wm_command_hwnd; get_wm_command_id; getcanonicalformatetc; getclassid; getclassinfo; getclientrect; getclientsite; getclipboarddata; getcurfile; getdata; getdatahere; getdesktopwindow; getdlgitem; getdocmiscstatus; getdocument; getextent; getinplacesite; getlasterror; getmenustring; getmessage; getmiscstatus; getmodulefilename; getmoniker; getoleobjectdatahere; getrect; getrunningobjecttable; getsavefilename; getsubmenu; getsystemmetrics; getuserclassid; getusertype; getwindow; getwindowcontext; getwindowlong; getwindowrect; getword; handsoffstorage; initapp; initfromdata; initnew; inplacedeactivate; insertmenu; insertmenus; invalidaterect; isdirty; isdlgbuttonchecked; isequaliid; isspace; isuptodate; load; loadcursor; loadmenu; lockserver; lstrcat; lstrcmp; lstrcmpi; lstrcmpiw; lstrcpy; lstrcpyw; lstrlen; lstrlenw; maindlgproc; makeintresource; mergemenus; movewindow; multibytetowidechar; next; olecreatemenudescriptor; oledestroymenudescriptor; olesave; olestr; oncommand; oncreate; ondocwindowactivate; onframewindowactivate; oninplaceactivate; oninplacedeactivate; onpaint; onuiactivate; onuideactivate; open; openstream; openstreams; outputdebugstring; parsecommandline; postquitmessage; querygetdata; queryinterface; reactivateandundo; readclassstg; regclosekey; regcreatekeyex; register; registerclass; registerclassimplcategories; registerclipboardformat; registerserver; registerwindowmessage; regsetvalueex; release; releasestreamsandstorage; removemenu; removemenus; reset; resizeborder; resultfromscode; revoke; rgb; save; savecompleted; saveviewstate; seek; sendonrename; sendonsave; setactiveobject; setclientsite; setcolorscheme; setdata; setextent; setfocus; sethostnames; setinplacesite; setmenu; setmoniker; setobjectrects; setparent; setrect; setrectcomplex; setsize; setwindowlong; show; showwindow; skip; skip; stdapi_; stdmethodimp_; stgcreatedocfile; stgopenstorage; stringfromiid; succeeded; switch; text; translateaccelerator; translatemessage; uiactivate; uideactivate; unadvise; update; updatemenu; updatewindow; viewwndproc; widechartomultibyte; winmain; write; writeclassstg; wsprintf; zeromemory