Re: Programming with windows api (windows.h)

2012-12-20 Thread monarch_dodra
On Monday, 17 December 2012 at 17:24:40 UTC, Andrej Mitrovic wrote: On 12/17/12, monarch_dodra monarchdo...@gmail.com wrote: Am I doing it wrong, or are is the amount of ported windows interface currently limited... std.c.windows.windows is a very thin layer around the API. There are better

Programming with windows api (windows.h)

2012-12-17 Thread monarch_dodra
I'm a bit confused about how to interface with windows.h. All I'm trying to do is retrieve some text from my clipboard to print it. So far, I have this: // import std.stdio; import core.sys.windows.windows; extern (Windows) { HWND GetClipboardOwner(); BOOL OpenClipboard(HWND

Re: Programming with windows api (windows.h)

2012-12-17 Thread Andrej Mitrovic
On 12/17/12, monarch_dodra monarchdo...@gmail.com wrote: Am I doing it wrong, or are is the amount of ported windows interface currently limited... std.c.windows.windows is a very thin layer around the API. There are better bindings here: http://dsource.org/projects/bindings/wiki/WindowsApi

Re: Programming with windows api (windows.h)

2012-12-17 Thread John Chapman
On Monday, 17 December 2012 at 16:21:09 UTC, monarch_dodra wrote: I'm a bit confused about how to interface with windows.h. All I'm trying to do is retrieve some text from my clipboard to print it. Something like this: HWND hwnd = ... // your window handle (or null) if (OpenClipboard(hwnd))

Re: Programming with windows api (windows.h)

2012-12-17 Thread John Chapman
HGLOBAL data = GetClipboardData(CF_TEXT); Oops, should be CF_UNICODETEXT (13)