digitalmars.D.learn - import std.c.windows.windows;
- DNewbie (12/12) Jan 10 2012 I'm not sure I understand.. The page at http://dlang.org/windows.html sa...
- Mike Parker (5/15) Jan 10 2012 Those samples use a binding to the Win32 API[1] that does not ship with
- Andrej Mitrovic (5/5) Jan 10 2012 std.c.windows.windows is missing *a lot* of definitions. It also
- Mike Parker (3/8) Jan 10 2012 Yes, but it's not necessarily the best place to start for someone who
- DNewbie (6/14) Jan 10 2012 Ok.. I still don't understand why such a 'binding' is needed.
- Mike Parker (4/15) Jan 10 2012 Unfortunately, no. It is not a complete binding of the Win32 API. It has...
- DNewbie (2/21) Jan 14 2012 Understood. I think I'll go with the binding. Thnk you.
I'm not sure I understand.. The page at http://dlang.org/windows.html says Instead of the: #include <windows.h> of C, in D there is: import std.c.windows.windows; However, the samples at https://github.com/AndrejMitrovic/DWinProgramming/tree/master/Samples use import win32.windef; import win32.winuser; My question is which one should I use in my programs? -- D
Jan 10 2012
On 1/10/2012 10:24 PM, DNewbie wrote:I'm not sure I understand.. The page at http://dlang.org/windows.html says Instead of the: #include<windows.h> of C, in D there is: import std.c.windows.windows; However, the samples at https://github.com/AndrejMitrovic/DWinProgramming/tree/master/Samples use import win32.windef; import win32.winuser; My question is which one should I use in my programs?Those samples use a binding to the Win32 API[1] that does not ship with DMD. So in your case, std.c.windows.windows is probably what you want for now. [1]http://dsource.org/projects/bindings/wiki/WindowsApi
Jan 10 2012
std.c.windows.windows is missing *a lot* of definitions. It also doesn't provide aliases to ASCII/UTF16 functions like WindowsAPI does via the Unicode flag, so you have to explicitly use e.g. MessageBoxA/MessageBoxW instead of MessageBox. WindowsAPI is nicely modularized, and is based on existing MinGW headers.
Jan 10 2012
On 1/10/2012 11:44 PM, Andrej Mitrovic wrote:std.c.windows.windows is missing *a lot* of definitions. It also doesn't provide aliases to ASCII/UTF16 functions like WindowsAPI does via the Unicode flag, so you have to explicitly use e.g. MessageBoxA/MessageBoxW instead of MessageBox. WindowsAPI is nicely modularized, and is based on existing MinGW headers.Yes, but it's not necessarily the best place to start for someone who hasn't figured out the toolchain yet.
Jan 10 2012
On Tue, Jan 10, 2012, at 10:37 PM, Mike Parker wrote:Those samples use a binding to the Win32 API[1] that does not ship with DMD. So in your case, std.c.windows.windows is probably what you want for now. [1]http://dsource.org/projects/bindings/wiki/WindowsApiOk.. I still don't understand why such a 'binding' is needed. Is std.c.windows.windows not enough for everyone? -- D
Jan 10 2012
On 1/10/2012 10:57 PM, DNewbie wrote:On Tue, Jan 10, 2012, at 10:37 PM, Mike Parker wrote:Unfortunately, no. It is not a complete binding of the Win32 API. It has a lot of stuff, but if you need more you need to look elsewhere. Andrej hit on some of the deficiencies in his post.Those samples use a binding to the Win32 API[1] that does not ship with DMD. So in your case, std.c.windows.windows is probably what you want for now. [1]http://dsource.org/projects/bindings/wiki/WindowsApiOk.. I still don't understand why such a 'binding' is needed. Is std.c.windows.windows not enough for everyone?
Jan 10 2012
On Wed, Jan 11, 2012, at 01:16 PM, Mike Parker wrote:On 1/10/2012 10:57 PM, DNewbie wrote:Understood. I think I'll go with the binding. Thnk you.On Tue, Jan 10, 2012, at 10:37 PM, Mike Parker wrote:Unfortunately, no. It is not a complete binding of the Win32 API. It has a lot of stuff, but if you need more you need to look elsewhere. Andrej hit on some of the deficiencies in his post.Those samples use a binding to the Win32 API[1] that does not ship with DMD. So in your case, std.c.windows.windows is probably what you want for now. [1]http://dsource.org/projects/bindings/wiki/WindowsApiOk.. I still don't understand why such a 'binding' is needed. Is std.c.windows.windows not enough for everyone?
Jan 14 2012