Click to open or copy the files for the RegMpad sample.
This sample demonstrates how to use the Multiple Document Interface (MDI) functions to create an MDI notepad.
RegDB.c implements the semantics of the registry interface for this application. The visible interfaces and data structures are defined in RegDB.h.
The NT Registry is an object database consisting of keys and values. Keys have names and may contain other keys and values. A value is a name paired with a data object and a data type. The keys in the registry are analogous to the directories in a file system. In that vein the values are analogous to files.
Access to a key and its associated set of values is mediated by a key handle. Four key handles are given as predefined constants. Those handles correspond to the roots of key trees which have special significance. Handles for the other keys in the registry database may be constructed via the Registry's Open and Create interfaces using an existing key handle and a relative path string.
This sample uses the following keywords:
_alloca; _lclose; _llseek; _lread; _mbschr; _mbslen; _mbsncmp; aboutdlgproc; addaccessallowedace; addfile; alreadyopen; bringwindowtotop; changefile; charnext; charprev; charupper; checkdlgbutton; closeallchildren; closehandle; commandhandler; createappkeys; createmutex; defframeproc; deletedc; dialogbox; dialogboxparam; dlgdirlist; dlgdirselectex; enablemenuitem; enddialog; equalsid; escape; fileexists; find; finddlgproc; findnext; findprev; freelibrary; freesid; get_em_setsel_mps; get_wm_command_cmd; get_wm_command_hwnd; get_wm_command_mps; get_wm_mdiactivate_factivate; getcmdline; getcommandline; getcurrentprocess; getcurrentthread; getcurrentuserinfo; getdevicecaps; getdlgitem; getdlgitemtext; getfilename; getinitializationdata; getlasterror; getmenu; getprinterdc; gettextextentpoint; gettokeninformation; getwindow; getwindowlong; getwindowtext; getwindowtextlength; getwindowword; id; initializeacl; initializeapplication; initializeinstance; initializesecuritydescriptor; inituser; installapp; isdbcsleadbyte; isdlgbuttonchecked; iswild; loadconfiguration; loadcursor; loadfile; loadicon; loadlibrary; loadstring; local_findtext; localalloc; localfree; locallock; localrealloc; localunlock; lstrcpy; lstrlen; makeintresource; makelong; messagebox; mperror; mpframewndproc; mpmdichildwndproc; myreadfile; open; openfile; openprocesstoken; openthreadtoken; printdlgproc; printfile; querycloseallchildren; queryclosechild; realslowcompare; regclosekey; regcreatekeyex; regdeletekey; regdeletevalue; regflushkey; registerclass; regopenkeyex; regqueryvalueex; regsetvalueex; releasemutex; runningasadministrator; saveasdlgproc; saveconfiguration; savefile; selectfile; senddlgitemmessage; sendmessage; setdlgitemtext; setsecuritydescriptordacl; setsecuritydescriptorowner; setwindowlong; setwindowword; setwrap; showwindow; storeappconfig; strcpy; unreferenced_parameter; waitforsingleobject; winmain; wsprintf