三个问题之二:TILE的问题!!!
这个是我修改过的程序,我写的一个程序中的一部分,
用一个按键时间调用这段程序,没什么反应,就和没调用一样,为什么啊?
static boolean notepad_file(notepad* pMe)
{
AECHAR char3[MaxChar]={'h','e','a','r','t','\0'};
AECHAR char4[MaxChar]={'a','b','c','\0'};
if(SUCCESS == ISHELL_CreateInstance(pMe->a.m_pIShell,AEECLSID_FILEMGR,
(void **)&(pMe->pIFileMgr)))
{
if(IFILEMGR_Test(pMe->pIFileMgr, notepadfile) == SUCCESS)
{
if((pMe->pIFile = IFILEMGR_OpenFile(pMe->pIFileMgr, notepadfile,
_OFM_READWRITE)) == NULL)
{
return EFAILED;
}
IFILE_Read(pMe->pIFile,&char3,sizeof(MaxChar));
IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);
IDISPLAY_DrawText(pMe->a.m_pIDisplay,
AEE_FONT_NORMAL,
char3,
-1,
0,0,
NULL,NULL);
IDISPLAY_Update (pMe->a.m_pIDisplay);
}
if ((pMe->pIFile = IFILEMGR_OpenFile(pMe->pIFileMgr,notepadfile,
_OFM_CREATE)) == NULL)
{
return EFAILED;
}
IFILE_Write(pMe->pIFile,&char4,sizeof(MaxChar));
IDISPLAY_ClearScreen(pMe->a.m_pIDisplay);
IDISPLAY_DrawText(pMe->a.m_pIDisplay,
AEE_FONT_NORMAL,
char4,
-1,
0,0,
NULL,NULL);
IDISPLAY_Update (pMe->a.m_pIDisplay);
}
return TRUE;