Example #1
0
// --------------------
// EditProp
// --------------------
// This routine is called when the user clicks the button of a Button or EditButton property.
//
BOOL WINAPI DLLExport EditProp(LPMV mV, LPEDATA edPtr, UINT nPropID)
{
#ifndef RUN_ONLY
	EditAnimationParams eap;
	eap.m_dwSize = sizeof(EditAnimationParams);
	eap.m_pWindowTitle = NULL;
	eap.m_pImageTitles = NULL;
	eap.m_nImages = edPtr->numFrames;
	eap.m_pImages = &edPtr->imageFrames[0];
	eap.m_dwOptions = PICTEDOPT_CANBETRANSPARENT | PICTEDOPT_NOALPHACHANNEL;
	eap.m_nMaxImages = 1024;
	eap.m_nStartIndex = 0;
	eap.m_dwFixedWidth = 300;
	eap.m_dwFixedHeight = 100;

	if ( mV->mvEditAnimation(edPtr, &eap, NULL) ){
		LPEDATA pNewPtr = (LPEDATA)mvReAllocEditData(mV, edPtr, sizeof(EDITDATA) + eap.m_nImages * sizeof(WORD) );
		if( pNewPtr != NULL )
			edPtr = pNewPtr;
		else return FALSE;

		edPtr->numFrames = eap.m_nImages;

		for( int i = 0; i < eap.m_nImages; i++ )
			edPtr->imageFrames[i] = eap.m_pImages[i];

		mV->mvCallFunction(edPtr, EF_INVALIDATEOBJECT, 0, 0, 0);
		return TRUE;
	}

#endif // !defined(RUN_ONLY)
	return FALSE;
}
Example #2
0
__inline int mvGetAppCodePage(LPMV mV, LPVOID pApp) \
	{ return mV->mvCallFunction(NULL, 115, (LPARAM)pApp, (LPARAM)0, (LPARAM)0); }