|

楼主 |
发表于 2016-4-25 09:46:35
|
显示全部楼层
回 eric2013 的帖子
我用那个file浏览的程序,但是触摸不响应,不知道是怎么回事?
没有使用操作系统,
void OnICON00Clicked(unsigned char _ucDriveID)
{
const char acMask[] = "*.*";
CHOOSEFILE_INFO Info = { 0 };
WM_HWIN hWin;
int r;
char acDir[_MAX_PATH] = "0:";
char const * apDrives[1] = { 0 };
FRAMEWIN_SetDefaultFont(GUI_FONT_20_ASCII);
FRAMEWIN_SetDefaultTextAlign(GUI_TA_HCENTER);
// LISTVIEW_SetDefaultFont(&GUI_FontHZ_SimSun_16);
HEADER_SetDefaultFont(GUI_FONT_16_ASCII);
BUTTON_SetDefaultFont(GUI_FONT_16_ASCII);
/*
FS_SD 0
FS_NAND 1
FS_USB 2
*/
acDir[0] = _ucDriveID + 0x30 - 1;
apDrives[0] = acDir;
Info.pfGetData = _GetData2;
Info.pMask = acMask;
while (1)
{
// ½«°′Å¥éèÖÃμ½¶Ô»°¿òμÄéÏÃæ
// CHOOSEFILE_SetTopMode(Cnt % 2);
CHOOSEFILE_SetTopMode(1);
hWin = CHOOSEFILE_Create(0, //Handle of parent window.
0, //X position in pixels of the dialog in clie nt coordinates.
0, //Y position in pixels of the dialog in client coordinates.
LCD_GetXSize(), //X-size of the dialog in pixels.
LCD_GetYSize(), //Y-size of the dialog in pixels
apDrives, //Pointer to an array of strings containing the root directories to be used.
GUI_COUNTOF(apDrives),//Number of root directories.
0, //Initial index of the root directory to be used.
"File Dialog", //Title to be shown in the title bar.
0, //Additional flags for the FRAMEWIN widget.
&Info); //Pointer to a CHOOSEFILE_INFO structure.
CHOOSEFILE_SetButtonText(hWin, CHOOSEFILE_BI_CANCEL, "Close");
GUI_Exec();
GUI_TOUCH_Exec();
r = GUI_ExecCreatedDialog(hWin);
// óé case GUI_ID_OK: GUI_EndDialog(hWin, 0);
if (r == 0)
{
//μã»÷áËArchiveêôDÔμÄÎļt »á½øèëμ½Õaàò2¾íêÇË죬¿éòÔ
//ÔúÕaàï½øèëí¼Æ¬ÏÔê¾£¬MP32¥·Åμè1|Äü¡£
hWin = MESSAGEBOX_Create(Info.pRoot, "File:", 0);
GUI_Delay(2000);
WM_DeleteWindow(hWin);
}
// óécase GUI_ID_CANCEL: GUI_EndDialog(hWin, 1);
else
{
WM_DeleteWindow(hWin);
//OnICON00 = 0;
}
GUI_Exec();
GUI_TOUCH_Exec();
}
} |
|