自由拼音输入法(freepy) 版本2.2编译方案

新建一个win32动态库工程,把source目录下所有文件加入(mak文件可不加),在freepy.h文件中#include <tchar.h>上加一行代码:#define NOIME

把imm目录下两个文件复制到工程目录中,在工程属性-链接器-输入选项中,附加依赖项加上IMM32.LIB,模块定义文件加上freepy.def

在imm.h文件中,把下面代码(原来就有)拖放在#ifndef _IMM_上面:

typedef struct tagCANDIDATEINFO {                      
    DWORD               dwSize;                        
    DWORD               dwCount;                       
    DWORD               dwOffset[32];                  
    DWORD               dwPrivateSize;                 
    DWORD               dwPrivateOffset;               
} CANDIDATEINFO, *PCANDIDATEINFO, NEAR *NPCANDIDATEINFO, FAR *LPCANDIDATEINFO;

typedef struct tagCOMPOSITIONSTRING {                  
    DWORD dwSize;                                      
    DWORD dwCompReadAttrLen;                           
    DWORD dwCompReadAttrOffset;                        
    DWORD dwCompReadClauseLen;                         
    DWORD dwCompReadClauseOffset;                      
    DWORD dwCompReadStrLen;                            
    DWORD dwCompReadStrOffset;                         
    DWORD dwCompAttrLen;                               
    DWORD dwCompAttrOffset;                            
    DWORD dwCompClauseLen;                             
    DWORD dwCompClauseOffset;                          
    DWORD dwCompStrLen;                                
    DWORD dwCompStrOffset;                             
    DWORD dwCursorPos;                                 
    DWORD dwDeltaStart;                                
    DWORD dwResultReadClauseLen;                       
    DWORD dwResultReadClauseOffset;                    
    DWORD dwResultReadStrLen;                          
    DWORD dwResultReadStrOffset;                       
    DWORD dwResultClauseLen;                           
    DWORD dwResultClauseOffset;                        
    DWORD dwResultStrLen;                              
    DWORD dwResultStrOffset;                           
    DWORD dwPrivateSize;                               
    DWORD dwPrivateOffset;                             
} COMPOSITIONSTRING, *PCOMPOSITIONSTRING, NEAR *NPCOMPOSITIONSTRING, FAR  *LPCOMPOSITIONSTRING; 

在freepy.h文件中,加上下面结构(原来没有):

typedef struct tagINPUTCONTEXT1 {                       
    HWND                hWnd;                          
    BOOL                fOpen;                         
    POINT               ptStatusWndPos;                
    POINT               ptSoftKbdPos;                  
    DWORD               fdwConversion;                 
    DWORD               fdwSentence;                   
    union   {                                          
        LOGFONTA        A;                             
        LOGFONTW        W;                             
    } lfFont;                                          
    COMPOSITIONFORM     cfCompForm;                    
    CANDIDATEFORM       cfCandForm[4];                 
    HIMCC               hCompStr;                      
    HIMCC               hCandInfo;                     
    HIMCC               hGuideLine;                    
    HIMCC               hPrivate;                      
    DWORD               dwNumMsgBuf;                   
    HIMCC               hMsgBuf;                       
    DWORD               fdwInit;                       
    DWORD               dwReserve[3];                  
} FAR *LPINPUTCONTEXT1;

把下面两行

void MoveCandWindow(HWND , LPUIEXTRA , LPINPUTCONTEXT);

void MoveCompWindow( HWND,LPUIEXTRA ,LPINPUTCONTEXT);

改成

void MoveCandWindow(HWND , LPUIEXTRA , LPINPUTCONTEXT1);

void MoveCompWindow( HWND,LPUIEXTRA ,LPINPUTCONTEXT1);

现在可以编译成功了.

把编译成功的DLL文件改名为FREEPY.IME,复制到WINDOWS/SYSTEM32目录中,源代码BINARY目录中的freepy.tab和freepysys.dic文件也复制到WINDOWS/SYSTEM32目录中,编译并运行register.c,打开REGEDIT,找到自由拼音输入法所在的注册表项,(HKEY_LOCAL_MACHINE//System//CurrentControlSet//Control//Keyboard Layouts下面的子键),名字改为E0070804,现在可以在语言栏设置里面添加自由拼音输入法了.


本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/itclock/archive/2009/06/18/4281276.aspx

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值