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

📄 worddetail1.c

📁 国家ASIC工程中心使用的嵌入式操作系统
💻 C
字号:
/*
 *	wordDetail.c use to show the detail information of a word
 */

#include <stdio.h>
#include <string.h> 

#include <sys\sysusr.h>
#include <sys\sysmsg.h>


#include <asixwin.h>
#include <asixapp.h>
#include <asixwin\asix_ed.h>
#include <asixwin\asix_tb.h>
#include <ctype.h>


#include "WordM1.h"
#include "wordDetail1.h"
#include "WordMem.h"
#include "List.h"



extern unsigned		char	*pExpBuf[MAXWORDNUM];


/*******************************************************************
* Function: 	showDetail()
*
* Parameter: 	int lev, int list ,int index( index refer to the pos of word 
*				in a list )
*
* Description:	This Function use to display the explalation of word that the 
*				user click 
*
* returns:	
*
*********************************************************************/

void ShowDetail(int list, int index)
{
	//窗口和控件ID
	U32 mainwin;
	U32 tskbar;
	U32 DetailExp;
	//函数变量
	MSG 	msg;
	U8 	quit = 0;
	char 	*exp;
	U32 pGC;
	int i;
	mainwin = CreateWindow( WNDCLASS_WIN, 
							"单词详细解释", 
							WS_OVERLAPPEDWINDOW,
							0, 0, LCD_WIDTH, LCD_HEIGHT,
							0,
							0,
							NULL );
	tskbar = CreateWindow( 	WNDCLASS_TSKBAR,
							NULL,
							WS_CHILD|TBS_TYPICAL,
							0, 0, 0,0,
							mainwin,
							0,
							NULL);
	DetailExp = CreateWindow( WNDCLASS_EDITOR,
							  NULL,
							  WS_CHILD|ES_MULTI_REGULAR,
							  0, 20, LCD_WIDTH, LCD_HEIGHT-40,
							  mainwin,
							  MAX_EXP + 1,
							  NULL);
	

	SetWindowText(DetailExp, pExpBuf[index-1] , NULL);

//	strcpy(exp,Wordbuf[index]);
//	strcat(exp,WordExpbuf[index]);
	
	while(!quit)
	{
		ASIXGetMessage(&msg,NULL,0,0);
		switch(msg.message)
		{
			case WM_QUIT:
		        quit = 1;
		     	break;
		     	
		    default:
		     	break;	
		}//end switch msg.message?
		DefWindowProc(msg.message, msg.lparam, msg.data, msg.wparam);
	}//end while(!quit)
	DestroyWindow(mainwin);
	return;
}

⌨️ 快捷键说明

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