⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 win_sysplacereport.c

📁 这是一个linux下基于MiniGUI的手机界面设计源码
💻 C
字号:
/***	COMPANY NAME:	国星**	FILE    NAME:	win_sysPlaceReport.c**	FILE	PATH:	Interface/win_sysPlaceReport.c**	WINDOWS NAME:	位置报告**	WINDOWS PATH:	系统 / 位置报告**	CREATER	NAME:	LiWencheng,JiangYuanqing**	MENDER	NAME:	LiWencheng**	CHANGE  TIME:	11/15/2007 **	OTHER  INFOR:	无*/#include "sysSrcInfo.h"static BITMAP bmp_sysPlaceReport;//缓存中间状态栏图片  //flagPlaceReport=1 return单次定位,//flagPlaceReport=2 return连续定位,// flagPlaceReport=3 return紧急定位 static int flagPlaceReport ;static HWND userAddr , hWndCombox;static HWND P_hwndedit,hWndMainsysPlaceReport;static HWND check;/* 位图数组 */static const char *bmp_name_sysPlaceReport[] = {	"./Pictures/b_windowsbackground_1.PNG",			"./Pictures/b_send.PNG",	"./Pictures/c_hide.PNG",				"./Pictures/return.PNG"			};static const char *labels_sysPlaceReport[] = {	"北京54-大地坐标", 	"北京54-高斯坐标", };/* 定义皮肤元素数组 *///三个button 为左中右,并不表示它就一定指OK或MENUstatic skin_item_t skin_items_sysPlaceReport [] ={	{SIID_OK,            SI_TYPE_CHKBUTTON   | SI_TEST_SHAPE_RECT | SI_STATUS_VISIBLE,		 BUTTONLEFT_X,   BUTTON_Y, {},   1 ,"" },	{SIID_MENU,          SI_TYPE_CHKBUTTON   | SI_TEST_SHAPE_RECT | SI_STATUS_VISIBLE,		 BUTTONCENTER_X, BUTTON_Y, {},   2, "" },	{SIID_RETURN,        SI_TYPE_CHKBUTTON   | SI_TEST_SHAPE_RECT | SI_STATUS_VISIBLE,		 BUTTONRIGHT_X,  BUTTON_Y, {},   3, "" }};/* 定义皮肤 */skin_head_t skin_sysPlaceReport ={    "main",  //const BITMAP* bmps;    SKIN_STYLE_TOOLTIP, NULL, NULL,     0, 3, skin_items_sysPlaceReport, FALSE /** The number of the items in this skin. */  /* 定义皮肤元素数组 */ //注意上面数组的大小变了,则8变成多少};static int main_event_cb_sysPlaceReport (HWND hwnd, skin_item_t* item, int event, void* data){    if (event == SIE_BUTTON_CLICKED) {     switch (item->id) {  //按的那个图片			case SIID_OK:	//send            	break;//case SIID_OK:                      case SIID_RETURN://righ             						LoadSkinBmps( &skin_sysPlaceReport, FALSE ,bmp_name_sysPlaceReport ,(sizeof (bmp_name_sysPlaceReport))/sizeof(char *) );    						ShowWindow ( hWndMainsysPlaceReport, SW_HIDE);						//SendMessage (hWndMainsysPlaceReport, MSG_CLOSE, 0, 0);						win_system (hWndMain);                return 0;            break;        }    }    return 1;}/*static void check_notif_proc (HWND hwnd ,int id, int nc, DWORD add_data){	printf("SendMessage (check, BM_SETCHECK, -----------%d\n",SendMessage (check, BM_GETCHECK, BST_CHECKED, 0));		if(SendMessage (check, BM_GETCHECK, BST_CHECKED, 0))		{			SetApplyMutiReport (1);			printf("SetApplyMutiReport (1);\n");		}		else		{			SetApplyMutiReport (0);		}	}*/static void P_hwndedit_notif_proc (HWND hwnd ,int id, int nc, DWORD add_data){		char buff[3];		int i;		if(nc ==EN_CHANGE)		{				GetWindowText (P_hwndedit,buff,3);			i = atoi(buff);						//SetMutiReportFreq (i);		}	}static int msg_event_cb_sysPlaceReport (HWND hwnd, int message, WPARAM wparam, LPARAM lparam, int* result){	HDC hdc;	IVITEMINFO ivii_child;    	gal_pixel pixel;	HWND child;	HWND child1;	int i;	char buff[40];        switch (message) {        	case MSG_CREATE:			  LoadBitmap (HDC_SCREEN, &bmp_sysPlaceReport, "Pictures/a_location_5.PNG"); 		       userAddr = CreateWindow( CTRL_SLEDIT,  //纬度                           "",							WS_VISIBLE  | WS_CHILD | WS_BORDER ,//|ES_READONLY ,// | ES_AUTOWRAP,                           601,                           2, 40,150, 16, hwnd, 0);                                         	SetWindowText (userAddr,"1234");//GetUserID ()); 		       P_hwndedit = CreateWindow( CTRL_SLEDIT,  //频度                           "5",							WS_VISIBLE  | WS_CHILD | WS_BORDER ,//|ES_READONLY ,// | ES_AUTOWRAP,                           606,                           2,80,150, 16, hwnd, 0);                    SendMessage (P_hwndedit, EM_LIMITTEXT, 3,0L);                    SetNotificationCallback ( P_hwndedit,P_hwndedit_notif_proc);                    /*                    sprintf(buff,"%d",GetMutiReportFreq ());                    SetWindowText (P_hwndedit,buff);*/ 		       check = CreateWindow( "button",  //                           	"启用连续位置报告",				WS_VISIBLE  | BS_AUTOCHECKBOX ,//|ES_READONLY ,// | ES_AUTOWRAP,                     	606, 3,100,140 , 20, hwnd, 0);			//SetNotificationCallback ( check,check_notif_proc);			SetWindowBkColor (check, pixel);						//if(GetApplyMutiReport () == 1)			{				SendMessage (check, BM_SETCHECK, BST_CHECKED, 0);			}									hWndCombox = CreateWindow( CTRL_COMBOBOX, "", WS_CHILD | WS_VISIBLE | CBS_EDITNOBORDER|//WS_BORDER|//							CBS_READONLY|CBS_SPINARROW_LEFTRIGHT |CBS_SORT|CBS_SPINLIST, 2343, 5, 120, 140, 25, hwnd, 0);              	gal_pixel pixel = RGB2Pixel (HDC_SCREEN, 0xFF, 0xFF, 0xFF);     	       	SetWindowBkColor (hWndCombox, pixel);			for(i = 0;i<2;i++)			{					SendMessage (hWndCombox, CB_ADDSTRING, 0, (LPARAM)labels_sysPlaceReport[i]);			}						SendMessage (hWndCombox, CB_SETCURSEL, GetCurrCoordinate (), 0 );							//默认显示					//ShowByDaDi (J_hwndedit_loclocate ,W_hwndedit_loclocate,locateInfo.longitude , locateInfo.latitude) ;//显示"经度""纬度"			//ShowHighByDaDiGao (locatehight_loclocate,locateErr_loclocate ,locateInfo.loc_hight,locateInfo.loc_highterr);//显示"高程"""高程误差" 						//SetWindowText (locatetime_loclocate,locateInfo.time );//显示时间			//ShowTimeString ( locateInfo.time , buff );			//SetWindowText (locatetime_loclocate,buff);//显示时间	        break;	  case MSG_PAINT :				  hdc=BeginPaint (hwnd);               				SetBkMode (hdc, BM_TRANSPARENT); 		  		FillBoxWithBitmap (hdc, ZTL_PIC_X,ZTL_PIC_Y, ZTL_PIC_W,ZTL_PIC_H, &bmp_sysPlaceReport);				TextOut (hdc, WZ_ZTL_X4, WZ_ZTL_Y, "位置报告" );                  TextOut (hdc,3, 20,  "位置报告用户地址");                  TextOut (hdc,3, 60, "位置报告频度(秒)");                   EndPaint (hwnd,hdc);	      break;    }        return 1;}void win_sysPlaceReport(HWND hwndmain ){    	MSG msg;		LoadSkinBmps( &skin_sysPlaceReport, TRUE ,bmp_name_sysPlaceReport ,(sizeof (bmp_name_sysPlaceReport))/sizeof(char *) );        if (skin_sysPlaceReport.bmps == NULL) {      	  	//printf ("Could not load skin bitmaps!\n");        }	if ( !skin_init (&skin_sysPlaceReport, main_event_cb_sysPlaceReport, msg_event_cb_sysPlaceReport) ){    /* 初始化皮肤 */		int i=9;        	//printf ("skin init fail!%d\n\n",i);    	}    	else{ 	    hWndMainsysPlaceReport = create_skin_control (&skin_sysPlaceReport, hwndmain,143, DEF_X_, DEF_Y_,                               DEF_WIDTH, DEF_HEIGHT);		currShowWindowHwnd = hWndMainsysPlaceReport;         }}#ifndef _LITE_VERSION#include <minigui/dti.c>#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -