Prev: How to resolve the ftLastWriteTime field bug of FtpFindFirstFile in wininet.dll?
Next: How to abort FindFirstFile or FindNextFile when taking too long
From: Sa3Q on 12 Nov 2009 13:17 =================== i try to use this code but it appear only 000000 code while(1){ HWND hWndFW = GetForegroundWindow(); DWORD dwThreadId = GetWindowThreadProcessId(hWndFW, NULL); HKL h = GetKeyboardLayout(dwThreadId); LANGID langid = LANGID(LOWORD(HandleToLong(h))); cout <<h; cout << "\n"; Sleep(2000); } ===== LANGID not defined and the output only 000000 please what is this problem
From: Sa3Q on 14 Nov 2009 08:17 On 12 ÙÙÙ٠بر, 20:17, Sa3Q <s3qs...(a)gmail.com> wrote: > =================== > i try to  use this code but it appear only 000000 code > >   while(1){ > HWND hWndFW = GetForegroundWindow(); > DWORD dwThreadId = GetWindowThreadProcessId(hWndFW, NULL); > HKL h = GetKeyboardLayout(dwThreadId); > LANGID langid = LANGID(LOWORD(HandleToLong(h))); > >         cout <<h; >         cout << "\n"; >     Sleep(2000); >     } > > ===== > LANGID not defined  and the output only 000000 > please what is this problem ----------------------------------------------------------------------------------------------------------------------- please help meeeeeeeeeeeeeeeeeeeeeee
From: Alain on 14 Nov 2009 10:46 "Sa3Q" <s3qsa3q(a)gmail.com> a �crit dans le message de news: 74f0e9d3-cc6d-4ca1-81ad-f774dc338f35(a)c3g2000yqd.googlegroups.com... On 12 ??????, 20:17, Sa3Q <s3qs...(a)gmail.com> wrote: > =================== > i try to use this code but it appear only 000000 code > > while(1){ > HWND hWndFW = GetForegroundWindow(); > DWORD dwThreadId = GetWindowThreadProcessId(hWndFW, NULL); > HKL h = GetKeyboardLayout(dwThreadId); > LANGID langid = LANGID(LOWORD(HandleToLong(h))); > > cout <<h; > cout << "\n"; > Sleep(2000); > } Which OS are you using ? It works on XP : if you switch Notepad to English, you get "04090409"
From: Sa3Q on 15 Nov 2009 16:16 On 14 ÙÙÙ٠بر, 17:46, "Alain" <al...(a)distrib.fr> wrote: > "Sa3Q" <s3qs...(a)gmail.com> a écrit dans le message de news: > 74f0e9d3-cc6d-4ca1-81ad-f774dc338...(a)c3g2000yqd.googlegroups.com... > On 12 ??????, 20:17, Sa3Q <s3qs...(a)gmail.com> wrote: > > > =================== > > i try to use this code but it appear only 000000 code > > > while(1){ > > HWND hWndFW = GetForegroundWindow(); > > DWORD dwThreadId = GetWindowThreadProcessId(hWndFW, NULL); > > HKL h = GetKeyboardLayout(dwThreadId); > > LANGID langid = LANGID(LOWORD(HandleToLong(h))); > > > cout <<h; > > cout << "\n"; > > Sleep(2000); > > } > > Which OS are you using ? > It works on XP  : if you switch Notepad to English, you get "04090409" thank you alain that's right my windows7 it run perfect when the cursor on any place for write thank you all
From: Sa3Q on 15 Nov 2009 23:02
i have an erroe in the code {{{{{{{{{{{{{ error C2065: 'HandleToLong' : undeclared identifier }}}}}}}}}}}}} how can i fix it thank you i use visual c++ 6 |