The program below works on Windows NT, but fails on Windows 95 with
Unrecognised I/0 exception. (This is with hugs970719, green card 1,
win32 interface.)

Cheers 
  Meurig

PS Are you going to include the rest of the widget interface for Win32, 
   there are some functions such as createToolbarEx missing.



module TestGraphics (module TestGraphics,
                     module Graphics,
                     module Win32) where

import qualified Graphics as G
import qualified GraphicsWND as GN
import qualified GraphicsWindows as GW
import qualified Win32 as W


button = do  
             win <- G.openWindow "test" (100,100)
             hwnd <- GW.windowHWND win
             handle <- W.getStdHandle W.sTD_INPUT_HANDLE
             b <- W.createButton "mybutton" W.bS_PUSHBUTTON (combineWS
[W.wS_VISIBLE,W.wS_CHILD]) (Just 0) (Just 0) (Just 60) (Just 60) (Just
hwnd) Nothing handle
             return (win,b)
         `catch` (\e -> do print e
                           fail e)
runtest  = G.runGraphics $ do 
                           (w,b) <- button 
                           G.getLBP w
                           return ()

combineW :: W.WindowStyle -> W.WindowStyle -> W.WindowStyle
combineW (W.WindowStyle a) (W.WindowStyle b) = W.WindowStyle (W.orb a b)

combineWS :: [W.WindowStyle] -> W.WindowStyle
combineWS ws = foldr1 combineW ws

--
Meurig Sage
Dept of Computing Science
University of Glasgow
http://www.dcs.gla.ac.uk/~meurig
mailto:[EMAIL PROTECTED]

Reply via email to