thank you so much John :)
On Wednesday, 17 June 2015 at 21:00:55 UTC, Dan wrote:
thank you John it worked :)
do I always need do the same for all windows API?
For most Win32 API functions, yes. Although there are some more
complete headers on Github (for example,
https://github.com/rikkimax/WindowsAPI).
On Wednesday, 17 June 2015 at 20:50:27 UTC, John Chapman wrote:
wchar[MAX_PATH] buffer;
int length = GetWindowTextW(GetForegroundWindow(),
buffer.ptr, buffer.length);
Don't know why I used MAX_PATH there. You should probably
dynamically allocate a buffer based on GetWindowTextLengthW.
thank you John it worked :)
do I always need do the same for all windows API?
On Wednesday, 17 June 2015 at 20:40:02 UTC, Dan wrote:
I'm new to Dlang and I have no Idea whats wrong with this code!
wchar[260] buffer;
HWND hWindow = GetForegroundWindow();
GetWindowTextW(hWindow, buffer, sizeof(title)); <-- Problem here
The compiler is complaining it can't find an identifi
GetWindowTextW(hWindow, buffer, sizeof(title)); <-- Problem here
please Ignore the sizeof(title) parameter, I copied that from c++
equivalent code :D
I'm new to Dlang and I have no Idea whats wrong with this code!
wchar[260] buffer;
HWND hWindow = GetForegroundWindow();
GetWindowTextW(hWindow, buffer, sizeof(title)); <-- Problem here
hi
I'm using those imports:
import core.runtime;
import core.sys.windows.windows;
when I call GetWindowTextW DMD compiler complains!
(error:undefined identifier)
any solution?