how to display picture module in PtPanelgroup ,when picture

bridged with qdn.public.qnxrtp.photon
Post Reply
zhz

how to display picture module in PtPanelgroup ,when picture

Post by zhz » Thu Dec 04, 2003 8:45 am

My program is that:
I have a PtPanelGroup control in base windows.
In the PtPanelGroup ,there are 6 picture module (use as internal link
module)switch each other.Every 1 second,a timer will update the picture
module content.
So I create the 6 modules in global_init.c (Application --startup info --
initialize function)
There are some code in the function global_init.c:

ApCreateMudule(ABM_pic_module_0,NULL,NULL);
ApCreateMudule(ABM_pic_module_1,NULL,NULL);
ApCreateMudule(ABM_pic_module_2,NULL,NULL);
ApCreateMudule(ABM_pic_module_3,NULL,NULL);
ApCreateMudule(ABM_pic_module_4,NULL,NULL);
ApCreateMudule(ABM_pic_module_6,NULL,NULL);


And in PtPanelGroup Activate Callback ,I have some code:

int
SwitchTo_TabPic( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t
*cbinfo )

{

PtPanelGroupCallback_t *pgcb =
(PtPanelGroupCallback_t*)(cbinfo->cbdata);

/* eliminate 'unreferenced' warnings */
widget = widget, apinfo = apinfo, cbinfo = cbinfo;



/* Clear the PtPanelGroup display */
PtClearWidget(widget);

switch(pgcb->new_panel_index)
{
case 0:
ApModuleParent(ABM_pic_module_0,AB_PARENT,widget);
PtRealizeWidget(ABW_pic_module_0);
break;
case 1:
ApModuleParent(ABM_pic_module_1,AB_PARENT,widget);
PtRealizeWidget(ABW_pic_module_1);
break;
case 2:
ApModuleParent(ABM_pic_module_2,AB_PARENT,widget);
PtRealizeWidget(ABW_pic_module_2);
break;
case 3:
ApModuleParent(ABM_pic_module_3,AB_PARENT,widget);
PtRealizeWidget(ABW_pic_module_3);
break;
case 4:
ApModuleParent(ABM_pic_module_4,AB_PARENT,widget);
PtRealizeWidget(ABW_pic_module_4);
break;
case 5:
ApModuleParent(ABM_pic_module_5,AB_PARENT,widget);
PtRealizeWidget(ABW_pic_module_5);
break;
}

return( Pt_CONTINUE );

}


when I run the program, when I click the PanelGroup to switch ,it is blank,
no picture display here.
I don't know why?
How to display these picture module in PtPanelGroup ,when the picture module
created first?

Post Reply

Return to “qdn.public.qnxrtp.photon”