[Haskell-cafe] How do I marshall a pointer over SendMessage LPARAM or WPARAM?
Yuras Shumovich
shumovichy at gmail.com
Wed Jul 18 19:29:15 CEST 2012
On Wed, 2012-07-18 at 18:22 +0200, Simon Peter Nicholls wrote:
> Some "sending" code:
>
> Foreign.C.String.withCWString "frustrator" $ \s -> do
> let wParam = System.Win32.Types.castPtrToUINT s ::
> System.Win32.Types.WPARAM
> Graphics.Win32.sendMessage wnd Graphics.Win32.wM_APP wParam 0
>
> wndProc "receiving" code:
>
> | wmsg == Graphics.Win32.wM_APP = do
> s <- peekCWString $ System.Win32.Types.castUINTToPtr wParam
> putStrLn s
> return 0
>
More information about the Haskell-Cafe
mailing list