具体的源码部分改动请移步影子输入法H仓库,(还没有正式发布)仅仅给大家看一下影子的新功能
使用的效果如图所示,指针文件是从火老哥的kbl切换里面里面取得,感谢火老哥的授权
下面简单放出部分使用的dllcall的源码
包含了切换中英文对应的鼠标指针以及回复初始指针和一个简单的配置gui
Hzn_SettingsGui:
Gui hs:Add, CheckBox,Checked vCurTip gCurToggle, whether open the CurTip method?
gui hs:show,,Hzn_SettingsGui
gui hs:Submit,noHide
Return
CurToggle:
gui hs:Submit,noHide
if (CurTip=0){
SPI_SETCURSORS := 0x57
DllCall( "SystemParametersInfo", UInt,SPI_SETCURSORS, UInt,0, UInt,0, UInt,0 )
}
Else
gosub ChangeCur
Return
ChangeCurCn:
Cur_IBEAM := DllCall("LoadCursorFromFile", "Str","IBEAM_Cn.cur", "Ptr")
Cur_NORMAL := DllCall("LoadCursorFromFile", "Str","NORMAL_Cn.cur", "Ptr")
DllCall("SetSystemCursor", "Ptr", Cur_IBEAM, "Int", OCR_IBEAM)
DllCall("SetSystemCursor", "Ptr", Cur_NORMAL, "Int", OCR_NORMAL)
Return
ChangeCurEn:
Cur_IBEAM := DllCall("LoadCursorFromFile", "Str","IBEAM_En.cur", "Ptr")
Cur_NORMAL := DllCall("LoadCursorFromFile", "Str","NORMAL_En.cur", "Ptr")
DllCall("SetSystemCursor", "Ptr", Cur_IBEAM, "Int", OCR_IBEAM)
DllCall("SetSystemCursor", "Ptr", Cur_NORMAL, "Int", OCR_NORMAL)
Return
ChangeCur:
if (CurTip=1){
if (srf_mode = 0){
Gosub, ChangeCurEn
}
else{
Gosub, ChangeCurCn
}
}
Return