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

Developer

Forums

Pls help me ,I want to draw a line on Widget.
Sample code would be highly appreciated.:)

Use IDrawDecorator. See API reference.
Example code (not compilable):
DrawDecoratorContext *pc = MYCONTEXT(me);
IDrawDecorator *pidDraw = 0;
int nErr;
nErr = ISHELL_CreateInstance(GETSHELL(me), AEECLSID_DrawDecoratorWidget, (void**)&pidDraw);
DRAWHANDLERDESC_Init(&pc->hd, CWidget_CustomDrawOver, pc, 0);
IDRAWDECORATOR_SetDraw(pidDraw, &pc->hd);
IDRAWDECORATOR_SetWidget(pidDraw, pc->piw);
me->piw = (IWidget*)pidDraw;
IWIDGET_AddRef(me->piw);
CWidget_ContainerInsert(me);//insert into container.
RELEASEIF(pidDraw);

Use IDrawDecorator. See API reference.
Example code (not compilable):
DrawDecoratorContext *pc = MYCONTEXT(me);
IDrawDecorator *pidDraw = 0;
int nErr;
nErr = ISHELL_CreateInstance(GETSHELL(me), AEECLSID_DrawDecoratorWidget, (void**)&pidDraw);
DRAWHANDLERDESC_Init(&pc->hd, CWidget_CustomDrawOver, pc, 0);
IDRAWDECORATOR_SetDraw(pidDraw, &pc->hd);
IDRAWDECORATOR_SetWidget(pidDraw, pc->piw);
me->piw = (IWidget*)pidDraw;
IWIDGET_AddRef(me->piw);
CWidget_ContainerInsert(me);//insert into container.
RELEASEIF(pidDraw);

thanks a lot atul.

thanks a lot atul.