我注意到Haskell Win32 api没有SetForegroundWindow功能,而且我在haskell方面还不够熟练,无法自己添加这个功能。有没有办法用haskell复制它,或者有没有人用ffi做了自己的包装器?
发布于 2013-01-13 04:55:41
下面是一个使用FFI的简单包装器:
{-# LANGUAGE ForeignFunctionInterface #-}
module SetForegroundWindow
( setForegroundWindow
) where
import Foreign
import Graphics.Win32
foreign import stdcall safe "windows.h SetForegroundWindow"
c_setForegroundWindow :: HWND -> IO Bool
setForegroundWindow :: HWND -> IO Bool
setForegroundWindow = c_setForegroundWindowhttps://stackoverflow.com/questions/14297146
复制相似问题