📄 win_syslookboshu.c~
字号:
/*win_sysLookBoshu.c*//*** COMPANY NAME: 国星** FILE NAME: win_sysLookBoshu.c** FILE PATH: Interface/win_sysLookBoshu.c** WINDOWS NAME: 北斗波束** WINDOWS PATH: 系统 / 系统查看 / 北斗波束** CREATER NAME: LiWencheng,JiangYuanqing** MENDER NAME: LiWencheng** CHANGE TIME: 11/4/2007 ** OTHER INFOR: 无*/#include "sysSrcInfo.h"#define JULI_SLLI 16static HWND hwndEdit[6];static HWND hwndEditSDMMC;static BITMAP bmpSysBoshu;//缓存中间状态栏图片static HWND hWndMainSysBoshu, hWndCombox_XY, hWndCombox_SC;static const char *bmp_name_SysBoshu[] = { "./Pictures/b_windowsbackground_1.PNG", //第一张来做主界面 "./Pictures/OK.PNG", "./Pictures/return.PNG" };static const char *labels_SysBoshu[] = { "波束1", "波束2", "波束3", "波束4", "波束5", "波束6"};/*static const char *labels_SysBoshu[] = { "B1", "B2", "B3", "B4", "B5", "B6",};*//* 定义皮肤元素数组 */static skin_item_t skinItemsSysBoshu [] ={ {SIID_OK, SI_TYPE_CHKBUTTON | SI_TEST_SHAPE_RECT | SI_STATUS_VISIBLE, BUTTONLEFT_X, BUTTON_Y, {}, 1, "" }, {SIID_RETURN, SI_TYPE_CHKBUTTON | SI_TEST_SHAPE_RECT | SI_STATUS_VISIBLE, BUTTONRIGHT_X, BUTTON_Y, {}, 2, "" }, };/* 定义皮肤 */static skin_head_t skinSysBoshu ={ "main", //const BITMAP* bmps; SKIN_STYLE_TOOLTIP, NULL, NULL, 0, 2, skinItemsSysBoshu, FALSE /** The number of the items in this skin. */ /* 定义皮肤元素数组 */};static CloseWindow_SysBoshu(){ ShowWindow ( hWndMainSysBoshu, SW_HIDE); LoadSkinBmps( &skinSysBoshu, FALSE, bmp_name_SysBoshu, (sizeof (bmp_name_SysBoshu))/sizeof(char *) ); UnloadBitmap( &bmpSysBoshu);}static int main_event_cb_SysBoshu (HWND hwnd, skin_item_t* item, int event, void* data){ BOSHU boShu; int zhuBo; int chongBo; if (event == SIE_BUTTON_CLICKED) { switch (item->id) { case SIID_OK: zhuBo = SendMessage (hWndCombox_XY, CB_GETCURSEL, 0, 0 ); chongBo = SendMessage (hWndCombox_SC, CB_GETCURSEL, 0, 0 ); printf ("--------zhuBo == %d,chongBo =%d,B1=%d,B2=%d\n",zhuBo,chongBo,B1,B2); if (zhuBo != chongBo) { boShu.zhuBo = zhuBo; boShu.chongBo = chongBo; SetBOSHU( boShu ); } break; case SIID_RETURN: win_SysLook(hWndMain); CloseWindow_SysBoshu(); break; } } return 1;}static int msg_event_cb_SysBoshu (HWND hwnd, int message, WPARAM wparam, LPARAM lparam, int* result){ HDC hdc; int i; BOSHU *pBoShu; switch (message) { case MSG_CREATE: LoadBitmap (HDC_SCREEN, &bmpSysBoshu, "Pictures/a_SysLook_3.PNG"); for (i = 0;i<6;i++) { hwndEdit[i] = CreateWindow( CTRL_SLEDIT, "未用 信号强度0", WS_CHILD | WS_VISIBLE | WS_BORDER, //|ES_READONLY, i+25, 55, 20+i*JULI_SLLI, 100, 15, hwnd, 0); } hWndCombox_XY = CreateWindow( CTRL_COMBOBOX, "", WS_CHILD | WS_VISIBLE | WS_BORDER|//CBS_EDITNOBORDER|// CBS_READONLY|CBS_SPINARROW_LEFTRIGHT |CBS_SPINLIST, ///CBS_AUTOSPIN|CBS_AUTOLOOP| 2343, 80, 120, 70, 20, hwnd, 0); hWndCombox_SC = CreateWindow( CTRL_COMBOBOX, "", WS_CHILD | WS_VISIBLE | WS_BORDER|//CBS_EDITNOBORDER|// CBS_READONLY|CBS_SPINARROW_LEFTRIGHT |CBS_SPINLIST, ///CBS_AUTOSPIN|CBS_AUTOLOOP| 2343, 80, 140, 70, 20, hwnd, 0); for(i = 0;i<sizeof(labels_SysBoshu)/sizeof(char *);i++) { SendMessage (hWndCombox_XY, CB_ADDSTRING, 0, (LPARAM)labels_SysBoshu[i]); SendMessage (hWndCombox_SC, CB_ADDSTRING, 0, (LPARAM)labels_SysBoshu[i]); } GetBOSHU( &pBoShu); SendMessage (hWndCombox_XY, CB_SETCURSEL, pBoShu->zhuBo, 0 ); SendMessage (hWndCombox_SC, CB_SETCURSEL, pBoShu->chongBo, 0 );/* hwndEditSDMMC = CreateWindow( CTRL_SLEDIT, "WUKA", WS_CHILD | WS_VISIBLE | WS_BORDER, //|ES_READONLY, 343, 55, 80, 100, 15, hwnd, 0);*/ InvalidateRect (hWndMainSysLook, NULL, TRUE);//re1draw case MSG_PAINT : hdc=BeginPaint (hwnd); FillBoxWithBitmap (hdc, ZTL_PIC_X, ZTL_PIC_Y, ZTL_PIC_W, ZTL_PIC_H, &bmpSysBoshu); SetBkMode (hdc, BM_TRANSPARENT); for( i=0;i<6;i++) { TextOut (hdc, 2, 20+i*JULI_SLLI, labels_SysBoshu[i] ); } TextOut (hdc, 2, 120, "响应波束" ); TextOut (hdc, 2, 140, "时差波束" ); TextOut (hdc, WZ_ZTL_X4, WZ_ZTL_Y, "北斗波束" ); EndPaint (hwnd, hdc); break; } return 1;}void win_SysBoshu(HWND hwndmain){ MSG msg; LoadSkinBmps( &skinSysBoshu, TRUE, bmp_name_SysBoshu, (sizeof (bmp_name_SysBoshu))/sizeof(char *) ); if (skinSysBoshu.bmps == NULL) { printf ("Could not load skin bitmaps!\n"); } if ( !skin_init (&skinSysBoshu, main_event_cb_SysBoshu, msg_event_cb_SysBoshu) ){ /* 初始化皮肤 */ printf ("skin init fail!\n\n"); } else{ hWndMainSysBoshu = create_skin_control (&skinSysBoshu, hwndmain, 153, DEF_X_, DEF_Y_, DEF_WIDTH, DEF_HEIGHT); currShowWindowHwnd = hWndMainSysBoshu; }}#ifndef _LITE_VERSION#include <minigui/dti.c>#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -