Edit-time
Routines
- int WINAPI DLLExport Initialize(mv _far *knpV,
int quiet):
This function is called just after your extension is
loaded either at run-time or at edit-time. At run-time,
it is loaded at the start of the application. At edit-time,
it is loaded when MMF is starting and every other time
the object is needed and not already loaded.
- int WINAPI DLLExport Free(mv _far *knpV):
This function is called just before your extension is
unloaded either at run-time or at edit-time. At run-time,
this occurs just before the application closes. At edit-time,
this occurs when MMF is starting (it loads and unloads
each extension at start-up) and every other time the
extension is no longer needed.
- HGLOBAL WINAPI DLLExport UpdateEditStructure(mv
__far *knpV, void __far * OldEdPtr):
This function can be used to update the EDITDATA
structure of your object if it has changed from a
previous version. Return the new structure as an unlocked
HGLOBAL.
- int WINAPI DLLExport LoadObject(mv _far *knpV,
LPCSTR fileName, LPEDATA edPtr, int reserved):
This function is called when one of your objects is
created in the frame at edit-time. It is also called when
an object is cloned.
- void WINAPI DLLExport UnloadObject(mv _far *knpV,
LPEDATA edPtr, int reserved):
This function is called when one of your objects is
deleted from the frame at edit-time. It is not called
when a duplicate is deleted.
- void WINAPI DLLExport PutObject(mv _far *knpV,
fpLevObj loPtr, LPEDATA edPtr, ushort cpt):
This function is called when an object is dropped into
the frame.
- void WINAPI DLLExport RemoveObject(mv _far *knpV,
fpLevObj loPtr, LPEDATA edPtr, ushort cpt):
This function is called when an object is removed from
the frame.
- int WINAPI DLLExport MakeIcon ( mv _far *knpV,
BITMAPINFO FAR *lpBitmap, LPSTR lpName, fpObjInfo oiPtr,
LPEDATA edPtr ):
This function creates your object's icon. It's called
just after your object is created or modified (right
after set-up).
- void WINAPI DLLExport AppendPopup(mv _far *knpV,
HMENU hPopup, fpLevObj loPtr, LPEDATA edPtr, int nbSel):
This function is called just before opening your object's
right-click menu. If you want to modify that menu, this
is the time to do it.
- int WINAPI DLLExport CreateObject(mv _far *knpV,
fpLevObj loPtr, LPEDATA edPtr):
This function is called when a new object is created. It
should intialize the data in the EDITDATA structure.
- int WINAPI DLLExport SelectPopup(mv _far *knpV,
int modif, fpObjInfo oiPtr, fpLevObj loPtr, LPEDATA
edPtr, fpushort lpParams, int maxParams):
This function is called when a user selects a non-standard
menu option (that is, one that you added) from your
object's right-click menu.
- BOOL CALLBACK DLLExport setupProc(HWND hDlg,uint
msgType,WPARAM wParam,LPARAM lParam):
This routine should handle set-up for your object, which
included the set-up dialogue if you're using one.
- int WINAPI DLLExport ModifyObject(mv _far *knpV,
LPEDATA edPtr, fpObjInfo oiPtr, fpLevObj loPtr, int
modif, fpushort lpParams):
This function is called when your object has been
modified.
- int WINAPI DLLExport RebuildExt(mv _far *knpV,
LPEDATA edPtr, LPBYTE oldExtPtr, fpObjInfo oiPtr,
fpLevObj loPtr, fpushort lpParams):
This function rebuilds the datazone from the old datazone
and from the modifications made in teh set-up dialogue.
- void WINAPI DLLExport EndModifyObject(mv _far *knpV,
int modif, fpushort lpParams):
This function is called when all modifications of your
object are done.
- void WINAPI DLLExport GetObjectRect(mv _far *knpV,
RECT FAR *rc, fpLevObj loPtr, LPEDATA edPtr):
This function stores the rectangular size of the object
in the frame into the RECT FAR * rc structure.
- void WINAPI DLLExport EditorDisplay(mv _far *knpV,
fpObjInfo oiPtr, fpLevObj loPtr, LPEDATA edPtr, RECT FAR
*rc):
This function displays the object in the frame editor.
- BOOL WINAPI DLLExport IsTransparent(mv _far *knpV,
fpLevObj loPtr, LPEDATA edPtr, int dx, int dy):
This function tells MMF if the mouse is over a
transparent zone of your object.
- void WINAPI DLLExport PrepareToWriteObject(mv
_far *knpV, LPEDATA edPtr, fpObjInfo adoi):
This function is called just before writing the datazone
when saving the application.
- BOOL WINAPI DLLExport UsesFile (LPSTR fileName):
This function is called when a file is dropped onto the
frame. Return TRUE if your object can create an extension
from the file.
- void WINAPI DLLExport CreateFromFile (LPSTR
fileName, LPEDATA edPtr):
This function is called to create a new extension from a
file.
- int WINAPI DLLExport EnumElts (mv __far *knpV,
LPEDATA edPtr, ENUMELTPROC enumProc, ENUMELTPROC
undoProc, LPARAM lp1, LPARAM lp2):
This function is used to enumerate the images and fonts
used by your object.
Back to Main Page