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

📄 app.c

📁 本程序是使用CDMA450模块开发的一个无线公话完整程序
💻 C
字号:
#include "mmalloc.h"
#include "windows.h"
#include "cardmanage.h"
#include "phone.h"
#include "app.h"
#include "Translate.h"

int Safe_Config(void *);
extern int TimeSetWindow(void);
extern void use_Set(void);
extern int select_PB(void);
extern void TAKTIM_REC(void);
#if 1
#define MAXMENUname 6
static const char *MinMenuChr[]=
{
"电话本",
"短消息",
"通话记录",
"用户设置",
"通话计时",
"安全设置",
};
extern int Read_Dialwnd_Len(void);
int OnMainSelectMenu(int item)
{
//rect area;
//char Numberbf[24]; 
int		selMenu, id = 1;
selMenu = 0;
	while (id) {
		//id = cfgMainWnd(selMenu);// yu 显示所有菜单
		id = XSelectWindow((char**)MinMenuChr, MAXMENUname, selMenu);//,TRUE);
		if (id < 0)
			break;
		selMenu = id;
		switch (id) {
		case 0:
			if(1==select_PB())
				id=0;
			else
				id = 1;
			break;
		case 1:
			SMS_Browse(PARA_NULL);
			if(0<Read_Dialwnd_Len())
				id=0;
			else
				id = 1;
			break;
		case 2:
			PH_Talk_Record(PARA_NULL);
			if(0<Read_Dialwnd_Len())
				id=0;
			else
				id = 1;
			break;
		case 3:
			use_Set();
			id = 1;
			break;
		case 4:
			TAKTIM_REC();
			id = 1;
			break;
		case 5:
			Safe_Config(PARA_NULL);
			id = 1;
			break;
		default:
			id = 0;
			break;
		}
	}
	return 0;
}
#endif
typedef struct {
	window_t	wnd;
	int			res;
} null_wnd_t;
static null_wnd_t	*gNullWnd;

static int nullWindowProc(XMSG *msg)
{
	switch (msg->message) {
	case MSG_KEYDOWN:
		switch (msg->param1) {
		case KEY_CANCEL:
		case KEY_OK:
			XPostQuitMessage((window_t*)msg->comp);
			break;
		default:
			break;
		}
		break;
	default:
		return XDefaultWindowProc(msg);
	}
	
	return 0;
}


int  NullWindows(void *argv)
{
	rect		area;
	XMSG		msg;

	gNullWnd = (null_wnd_t*)malloc(sizeof(null_wnd_t));
	if (NULL == gNullWnd)
		return -1;
		
	SetRect(&area, 0, LCD_ICONEND+1, LCD_WIDTH-1, LCD_HEIGHT-1);
	XCreateWindow(NULL, &gNullWnd->wnd, &area, "NULL", nullWindowProc, FALSE);
	XSetBaseWindow(&gNullWnd->wnd);
	
	XShowComponent(&gNullWnd->wnd.comp);
	
	TextAlign(alignCenter, alignBottom);
	MoveTo(LCD_HMID, 36);
	DrawString((BYTE*)TranslateChar("创建中 "));
	MoveTo(LCD_HMID, 56);
	DrawString((BYTE*)argv);
	TextAlign(alignLeft, alignBottom);
	
	while (XGetMessage(&msg) != -1)
		XDispatchMessage(&msg);
	
	XDestroyWindow(&gNullWnd->wnd);

	free(gNullWnd);
	gNullWnd = NULL;
	return WND_NULL;
}

⌨️ 快捷键说明

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