
Hi guys. Last time I looked at the Win32 bindings, it covered a few basic file I/O things (e.g., special access modes, file permissions, etc.), registry editing, and that was about it. Yesterday I took another look, and was pleasently surprised to find that GDI is now covered. Suffice it to say, yesterday I wrote my very first ever program using the Win32 API directly. (Who'd have thought Haskell would be the place to do that?) This was complicated by a small glitch: Graphics.Win32.Window exposes SendMessage() but does not expose PostMessage(). Kind of an important difference there. Fortunately, it's not actually especially hard to fix this deficiency. (Basically few the source code for the module, copy and paste the line for SendMessage(), and edit it to say PostMessage(). The type signature just happens to be identical.) Is there a reason why this is missing to start with? What other functions are missing? (I didn't see PostQuitMessage() anywhere...) Still, 85 lines of code to make a working, native-looking Windows program isn't too shabby, really... (Not that any sane person writes nontrivial programs directly like this of course.)

On Sat, 2009-09-19 at 08:52 +0100, Andrew Coppin wrote:
This was complicated by a small glitch: Graphics.Win32.Window exposes SendMessage() but does not expose PostMessage(). Kind of an important difference there. Fortunately, it's not actually especially hard to fix this deficiency. (Basically few the source code for the module, copy and paste the line for SendMessage(), and edit it to say PostMessage(). The type signature just happens to be identical.) Is there a reason why this is missing to start with? What other functions are missing? (I didn't see PostQuitMessage() anywhere...)
I doubt there's any reason it was not bound except that it was not needed by the person who bound the related ones. Send in your patch. Duncan
participants (2)
-
Andrew Coppin
-
Duncan Coutts