中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 嵌入式系統(tǒng)多語言文本解決方案

        嵌入式系統(tǒng)多語言文本解決方案

        作者: 時(shí)間:2012-03-12 來源:網(wǎng)絡(luò) 收藏

          strFile = TXT_FILE_POLISH;

          break;

          default:

          return NULL;

          }

          //打開配置文件并檢查其格式

          if ((fd = open(strFile, O_RDONLY)) == -1)

          {

          return NULL;

          }

          if (read(fd, fh, 16) != 16)

          {

          close(fd);

          return NULL;

          }

          if (fh.lFileType != 0x4746432E || fh.lVersionNum != 0x32303156)

          {

          close(fd);

          return NULL;

          }

          //在映射區(qū)內(nèi)查找匹配的索引

          for (iOff = fh.lMapOffset; iOff fh.lDataOffset; iOff += 8)

          {

          if (read(fd, map, 8) != 8)

          {

          close(fd);

          return NULL;

          }

          if (map.wTextIndex == lIndex)

          {

          break;

          }

          }

          if (iOff >= fh.lDataOffset)

          {

          close(fd);

          return NULL;

          }

          //根據(jù)找到的映射來讀取文本內(nèi)容

          if (!(pBuf = GuiMemAlloc(map.wTextSize + 2)))

          {

          close(fd);

          return NULL;

          }

          lseek(fd, fh.lDataOffset + map.lTextOffset, SEEK_SET);

          if (read(fd, pBuf, map.wTextSize) != map.wTextSize)

          {

          GuiMemFree(pBuf);

          close(fd);

          return NULL;

          }

          pBuf[map.wTextSize >> 1] = 0;

          //建立字符串對象

          pTxt = CreateStringDirect(pBuf);

          GuiMemFree(pBuf);

          close(fd);

          return pTxt;

          }

          //定義與字符串相關(guān)的數(shù)據(jù)結(jié)構(gòu)

          #ifndef GUI_STRING_STRUCT

          typedef struct _string

          {

          WORD wWidth; //字符串寬度,字符串輸出時(shí)的總點(diǎn)陣寬度

          WORD wLength; //字符串長度,不包括'