ucgui 广告图片的8位色bmp以及gif文件 OSD层绘制说明
pic_osd = WM_GetDialogItem(hWin, MAIN_MENU_ID_PICTRUE7); //资源列表( _rc文件)增加一个控件 com_bmp_draw_osd(adv1_bmp_file,60,200+7*38); //(adv1_bmp_file 8位色图片文件的数据首地址 #if 0 stb_printf("ad_bmp_osd.XSize=%d\n",ad_bmp_osd.XSize); stb_printf("ad_bmp_osd.YSize=%d\n",ad_bmp_osd.YSize); stb_printf("ad_bmp_osd.BytesPerLine=%d\n",ad_bmp_osd.BytesPerLine); stb_printf("ad_bmp_osd.BitsPerPixel=%d\n",ad_bmp_osd.BitsPerPixel); int j=0; for(i = 0; i < ad_bmp_osd.YSize; i++) { for(j = 0; j < ad_bmp_osd.XSize; j++) { stb_printf("0x%02x,",bmp_osd_buffer[i*ad_bmp_osd.YSize+j]); if(j== (ad_bmp_osd.XSize-1)) stb_printf("\n"); } } #endif PICTURE_SetBitmap(pic_osd, &ad_bmp_osd); WM_ShowWindow(pic_osd);//资源列表为WM_CF_HIDE //该控件的图片为ad_bmp_osd,ad_bmp_osd存放为adv1_bmp_file 8位色图片文件的解析后的数据 |
资源列表 |
GUI_WIDGET_CREATE_INFO s_MainMenu[18] = { #ifndef ZIMU_OSD_SUPPORT {FRAMEWIN_CreateIndirect, NULL, 0, 0, 0, 720, 576, WM_CF_SHOW ,0, 0 },//用透明框架替换 #else {FRAMEWIN_CreateIndirect, NULL, 0, 0, -29, 720, 576, WM_CF_SHOW ,0, 0 },//用透明框架替换 #endif {EXTPICTURE_CreateIndirect, NULL, MAIN_MENU_ID_EXTPICTURE0, 40, 120, 238 ,378 + 32,WM_CF_SHOW,WPARA(s_main_menu_frame_para),0}, {PICTURE_CreateIndirect , NULL, MAIN_MENU_ID_PICTRUE0, button_start_x - 35, button_start_y + 0*button_distance, 29, 29,WM_CF_SHOW,WPARA(s_main_menu_epg_picture_para),0}, {PICTURE_CreateIndirect , NULL, MAIN_MENU_ID_PICTRUE1, button_start_x - 35, button_start_y + 1*button_distance, 29, 29,WM_CF_SHOW,WPARA(s_main_menu_book_picture_para),0}, {PICTURE_CreateIndirect , NULL, MAIN_MENU_ID_PICTRUE2, button_start_x - 35, button_start_y + 2*button_distance, 29, 29,WM_CF_SHOW,WPARA(s_main_menu_email_picture_para),0}, {PICTURE_CreateIndirect , NULL, MAIN_MENU_ID_PICTRUE3, button_start_x - 35, button_start_y + 3*button_distance, 29, 29,WM_CF_SHOW,WPARA(s_main_menu_smartcard_picture_para),0}, {PICTURE_CreateIndirect , NULL, MAIN_MENU_ID_PICTRUE4, button_start_x - 35, button_start_y + 4*button_distance, 29, 29,WM_CF_SHOW,WPARA(s_main_menu_web_picture_para),0}, {PICTURE_CreateIndirect , NULL, MAIN_MENU_ID_PICTRUE5, button_start_x - 35, button_start_y + 5*button_distance, 29, 29,WM_CF_SHOW,WPARA(s_main_menu_system_set_picture_para),0}, {PICTURE_CreateIndirect , NULL, MAIN_MENU_ID_PICTRUE6, button_start_x - 35, button_start_y + 6*button_distance, 29, 29,WM_CF_SHOW,WPARA(s_main_menu_help_picture_para),0}, //{PICTURE_CreateIndirect , NULL, MAIN_MENU_ID_PICTRUE7, button_start_x - 35, button_start_y + 7*button_distance, 178,100,/*29, 29,*/WM_CF_SHOW|WM_CF_HASTRANS,WPARA(s_main_menu_help_picture_para),0}, //{PICTURE_CreateIndirect , NULL, MAIN_MENU_ID_PICTRUE7, button_start_x - 35, button_start_y + 7*button_distance, 29, 29,WM_CF_SHOW,WPARA(s_main_menu_help_picture_para),0}, //{TEXT_CreateIndirect , NULL, MAIN_MENU_ID_TEXT0, 95, 50, 300, 36,WM_CF_SHOW|WM_CF_HASTRANS,WPARA(s_main_menu_text_para),0}, {BUTTON_CreateIndirect , NULL, MAIN_MENU_ID_BUTTON0, button_start_x, button_start_y + 0*button_distance, 161, 29,WM_CF_SHOW|WM_CF_HASTRANS,WPARA(s_main_menu_button0_para),0}, {BUTTON_CreateIndirect , NULL, MAIN_MENU_ID_BUTTON1, button_start_x, button_start_y + 1*button_distance, 161, 29,WM_CF_SHOW|WM_CF_HASTRANS,WPARA(s_main_menu_button1_para),0}, {BUTTON_CreateIndirect , NULL, MAIN_MENU_ID_BUTTON2, button_start_x, button_start_y + 2*button_distance, 161, 29,WM_CF_SHOW|WM_CF_HASTRANS,WPARA(s_main_menu_button2_para),0}, {BUTTON_CreateIndirect , NULL, MAIN_MENU_ID_BUTTON3, button_start_x, button_start_y + 3*button_distance, 161, 29,WM_CF_SHOW|WM_CF_HASTRANS,WPARA(s_main_menu_button3_para),0}, {BUTTON_CreateIndirect , NULL, MAIN_MENU_ID_BUTTON4, button_start_x, button_start_y + 4*button_distance, 161, 29,WM_CF_SHOW|WM_CF_HASTRANS,WPARA(s_main_menu_button4_para),0}, {BUTTON_CreateIndirect , NULL, MAIN_MENU_ID_BUTTON5, button_start_x, button_start_y + 5*button_distance, 161, 29,WM_CF_SHOW|WM_CF_HASTRANS,WPARA(s_main_menu_button5_para),0}, {BUTTON_CreateIndirect , NULL, MAIN_MENU_ID_BUTTON6, button_start_x, button_start_y + 6*button_distance, 161, 29,WM_CF_SHOW|WM_CF_HASTRANS,WPARA(s_main_menu_button6_para),0}, {BUTTON_CreateIndirect , NULL, MAIN_MENU_ID_BUTTON7, button_start_x, button_start_y + 7*button_distance, 161, 29,WM_CF_SHOW|WM_CF_HASTRANS,WPARA(s_main_menu_button7_para),0}, {PICTURE_CreateIndirect , NULL, MAIN_MENU_ID_PICTRUE7, button_start_x - 35, button_start_y + 7*button_distance, 178,100,/*29, 29,*/WM_CF_HIDE|WM_CF_HASTRANS,WPARA(s_main_menu_help_picture_para),0}, }; //必须放在最后一个,属性为WM_CF_HIDE|WM_CF_HASTRANS |
GUI_CONST_STORAGE GUI_LOGPALETTE Paladv1 = { 256, 1,//必须为1,否则当没有数据的时候,去WM_ShowWindow(pic_osd)显示全部很色 NULL }; static PICTURE_PARA s_main_menu_help_picture_para = { &bmmenu_help, GUI_BLUE, 0, 0, NULL }; |
文章来源: blog.csdn.net,作者:悟空胆好小,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/xushx_bigbear/article/details/122730394
- 点赞
- 收藏
- 关注作者
评论(0)