新聞中心

        EEPW首頁 > 嵌入式系統 > 設計應用 > 漫談WinCE的手寫識別技術(二)

        漫談WinCE的手寫識別技術(二)

        作者: 時間:2016-09-12 來源:網絡 收藏

        HWXSETCONTEXT = (DLL_HWXSETCONTEXT) GetProcAddress(hInstDll,TEXT(HwxSetContext));

        HWXINPUT = (DLL_HWXINPUT) GetProcAddress(hInstDll,TEXT(HwxInput));

        HWXPROCESS = (DLL_HWXPROCESS) GetProcAddress(hInstDll,TEXT(HwxProcess));

        HWXRESULTSAVAILABLE = (DLL_HWXRESULTSAVAILABLE) GetProcAddress(hInstDll,TEXT(HwxResultsAvailable));

        HWXGETRESULTS = (DLL_HWXGETRESULTS) GetProcAddress(hInstDll,TEXT(HwxGetResults));

        HWXDESTROY = (DLL_HWXDESTROY) GetProcAddress(hInstDll,TEXT(HwxDestroy));

        HWXENDINPUT = (DLL_HWXENDINPUT) GetProcAddress(hInstDll,TEXT(HwxEndInput));

        }

        else

        {

        return FALSE;

        }

        #endif //RECOGNIZE_FUNCTION_FROM_DLL

        if(HWXCONFIG() == FALSE)

        {

        return FALSE;

        }

        return TRUE;

        }

        //-----------------------------------------------------------------------

        //Descriptiong:

        // Begin recognizing

        //-----------------------------------------------------------------------

        BOOL CRecognizer::BeginRecognize()

        {

        BOOL bRes = FALSE;

        m_hrc = HWXCREATE();

        if(m_hrc == NULL)

        {

        goto END;

        }

        bRes = HWXSETGUIDE(m_hrc,m_hwxGuide);

        if(bRes == FALSE)

        {

        goto END;

        }

        bRes = HWXALCVALID(m_hrc,m_alc);

        if(bRes == FALSE)

        {

        goto END;

        }

        bRes = TRUE;

        END:

        return bRes;

        }

        //-----------------------------------------------------------------------

        //Descriptiong:

        // End recognizing

        BOOL CRecognizer::EndRecognize()

        {

        BOOL bRes = FALSE;

        //Destroy the recognizer

        if(HWXDESTROY(m_hrc) == FALSE)

        {

        goto END;

        }

        bRes = TRUE;

        END:

        return bRes;

        }

        //Descriptiong:

        // Get the character

        //Parameters:

        // pWchar: [out] The character get to be stored

        // iCount: [in] The number of pWchar

        //Return Values:

        // 0: Failed

        // >0: The number of the characters to return

        int CRecognizer::GetCharacter(WCHAR *pWchar, int iCount)

        {

        int iGetNum = 0;

        int i = 0;

        HWXRESULTS *phwxResults;

        //Because each HWXRESULTS after the first one could store two characters,

        //so only allocate (iCount / 2 + 1)

        int iNum = iCount / 2 + 1;

        phwxResults = new HWXRESULTS[iNum];

        memset(phwxResults,0,iNum * sizeof(HWXRESULTS));

        //End the input

        if(HWXENDINPUT(m_hrc) == FALSE)

        {

        goto END;

        }

        //Analyze the information

        if(HWXPROCESS(m_hrc) == FALSE)



        關鍵詞:

        評論


        相關推薦

        技術專區

        關閉
        主站蜘蛛池模板: 黎川县| 涪陵区| 沁源县| 会宁县| 渭源县| 九龙城区| 乌兰县| 横山县| 电白县| 麟游县| 永顺县| 湘阴县| 大方县| 揭西县| 万源市| 都匀市| 维西| 探索| 吴堡县| 长垣县| 玉环县| 和政县| 江孜县| 龙南县| 侯马市| 涪陵区| 绩溪县| 乌鲁木齐市| 北票市| 仁布县| 五寨县| 文昌市| 沙湾县| 若尔盖县| 大丰市| 巴东县| 平南县| 县级市| 巴青县| 八宿县| 临沧市|