搭建好Visual C++2010与windows SDK fo windows7的开发平台以后, 小试牛刀,检验下开发windows7的下的tabletpc应用, 代码注释如下 #include <windows.h> #include <comdef.h> #include <msinkaut.h> #include <msinkaut_i.c> //包含windows SDK for windows7的核心tabletpc头文件 #include "resource.h" const TCHAR* gc_szAppName = TEXT("Basic Recognition"); // 建立轨迹指针,识别指针,轨迹画板指针 IInkCollector * g_pIInkCollector = NULL; IInkDisp * g_pIInkDisp = NULL; IInkRecognizerContext * g_pIInkRecoContext = NULL; / // //清除Com指针 / void CleanUp() // Release all objects { if (g_pIInkRecoContext != NULL) { g_pIInkRecoContext->Release(); g_pIInkRecoContext = NULL; } if (g_pIInkDisp != NULL) { g_pIInkDisp->Release(); g_pIInkDisp = NULL; } if (g_pIInkCollector != NULL) { g_pIInkCollector->Release(); g_pIInkCollector = NULL; } } windows窗口消息循环 LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_CREATE: { //窗口消息创建,注册窗口,并创建com指针接口 HRESULT hr; hr = CoCreateInstance(CLSID_InkRecognizerContext, NULL, CLSCTX_INPROC_SERVER, IID_IInkRecognizerC