Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Hi, I am new to brew widgets, which i am doing on BMP sdk

I am trying to give a fading effect to the a text widget.

I have created FaderDesc , TransitionDesc , ITransition, IWidget for transition and fader.

ITransition *tranObj;
IWidget *iTransition;
FaderDesc fader;
TransitionDesc TransDesc;

then i have done CreateInstance

if(ISHELL_CreateInstance(pMe->Applet.m_pIShell,AEECLSID_FADER_1,&pMe->iTransition)!=SUCCESS)
return FALSE;

i have also created

pMe->TransDesc.piWidget = pMe->iTransition;
pMe->fader.base = pMe->TransDesc;
pMe->fader.start = 50;
pMe->fader.end = 150;

FADERDESC_Init(pMe->fader,pMe->txtColor,100,200);

ITRANSITION_QueryInterface(pMe->tranObj, AEEIID_TRANSITION, &pMe->fader);

ITRANSITION_StartFader(pMe->tranObj, pMe->fader, 4000, NULL, &pMe);

On compiling it gives 0 errors and 0 warning[B]

On launch it gives a widows error Unhandeled exception has occured in you application.

Can anyone help me where i am wrong.

You don't need TransDesc, since the FaderDesc contains a TransDesc.
Your code should be something like
if (ISHELL_CreateInstance(pMe->Applet.m_pIShell, AEECLSID_FADER_1, &pMe->tranObj) != SUCCESS)
return FALSE;
FADERDESC_Init(&pMe->fader, pMe->textWidget, 100, 200);
ITRANSITION_StartFader(pMe->tranObj, &pMe->fader, 4000, NULL, NULL);
where pMe->textWidget is the text widget you want to fade.
-Erik

You don't need TransDesc, since the FaderDesc contains a TransDesc.
Your code should be something like
if (ISHELL_CreateInstance(pMe->Applet.m_pIShell, AEECLSID_FADER_1, &pMe->tranObj) != SUCCESS)
return FALSE;
FADERDESC_Init(&pMe->fader, pMe->textWidget, 100, 200);
ITRANSITION_StartFader(pMe->tranObj, &pMe->fader, 4000, NULL, NULL);
where pMe->textWidget is the text widget you want to fade.
-Erik

Hi ebrowne,
Thanks for the reply..
i have done the same ways which you have mentioned, in my code you can see that i have used the "txtColor" which is my textWidget and i have not used TransDesc now, still i am unsuccessful with that.
ebrowne wrote:You don't need TransDesc, since the FaderDesc contains a TransDesc.
Your code should be something like
if (ISHELL_CreateInstance(pMe->Applet.m_pIShell, AEECLSID_FADER_1, &pMe->tranObj) != SUCCESS)
return FALSE;
FADERDESC_Init(&pMe->fader, pMe->textWidget, 100, 200);
ITRANSITION_StartFader(pMe->tranObj, &pMe->fader, 4000, NULL, NULL);
where pMe->textWidget is the text widget you want to fade.
-Erik

Hi ebrowne,
Thanks for the reply..
i have done the same ways which you have mentioned, in my code you can see that i have used the "txtColor" which is my textWidget and i have not used TransDesc now, still i am unsuccessful with that.
ebrowne wrote:You don't need TransDesc, since the FaderDesc contains a TransDesc.
Your code should be something like
if (ISHELL_CreateInstance(pMe->Applet.m_pIShell, AEECLSID_FADER_1, &pMe->tranObj) != SUCCESS)
return FALSE;
FADERDESC_Init(&pMe->fader, pMe->textWidget, 100, 200);
ITRANSITION_StartFader(pMe->tranObj, &pMe->fader, 4000, NULL, NULL);
where pMe->textWidget is the text widget you want to fade.
-Erik