ReactOS  0.4.14-dev-384-g5b37caa
kbdlayout.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: base/applications/testset/user32/kbdlayout/kbdlayout.c
5  * PURPOSE: Keyboard layout testapp
6  * COPYRIGHT: Copyright 2007 Saveliy Tretiakov
7  */
8 
9 #define UNICODE
10 #include<wchar.h>
11 #include <windows.h>
12 #include "resource.h"
13 
14 
15 
17 
18 
21 
22 
23 typedef struct {
25  WCHAR WndName[25];
26 } WND_DATA;
27 
29 {
30 
33  NULL,
35  (LPARAM)NULL);
36 
37  return 0;
38 }
39 
41  HINSTANCE hPrevInstance,
42  LPSTR lpCmdLine,
43  int nCmdShow)
44 {
45 
46 
47  hInst = hInstance;
48 
49  ThreadProc(0);
50 
51  return 0;
52 }
53 
54 
56 {
57  HKL *ret;
58  int n;
59 
61  ret = HeapAlloc(GetProcessHeap(), 0, sizeof(HKL)*n);
63  *list = ret;
64  return n;
65 }
66 
68 {
70 }
71 
72 
73 void UpdateData(HWND hDlg)
74 {
76  WCHAR buf2[512];
77 
78  HWND hList;
79  HKL *klList, hKl;
80  int n, i,j;
81 
83  swprintf(buf2, L"Active: %s (%x)", buf, GetKeyboardLayout(0));
84  SetWindowText(GetDlgItem(hDlg, IDC_ACTIVE), buf2);
85 
86  hList = GetDlgItem(hDlg, IDC_LIST);
88 
89  n = GetKlList(&klList);
90  hKl = GetKeyboardLayout(0);
91  for(i = 0; i < n; i++)
92  {
93  swprintf(buf, L"%x", klList[i] );
95  SendMessage(hList, LB_SETITEMDATA, j, (LPARAM) klList[i]);
96  if(klList[i] == hKl) SendMessage(hList, LB_SETCURSEL, j, 0);
97  }
98 
99  FreeKlList(klList);
100 }
101 
102 void FormatMsg(WCHAR *format, ...)
103 {
104  WCHAR buf[255];
105  va_list argptr;
106  va_start(argptr, format);
107  _vsnwprintf(buf, sizeof(buf)-1, format, argptr);
108  MessageBox(0, buf, L"msg", 0);
109  va_end(argptr);
110 }
111 
112 void FormatBox(HWND hWnd, DWORD Flags, WCHAR *Caption, WCHAR *Format, ...)
113 {
114  WCHAR buf[255];
115  va_list argptr;
116  va_start(argptr, Format);
117  _vsnwprintf(buf, sizeof(buf)-1, Format, argptr);
118  MessageBox(hWnd, buf, Caption, Flags);
119  va_end(argptr);
120 }
121 
122 
124 {
126 
127  if(uMsg == WM_INPUTLANGCHANGE)
128  {
129  FormatMsg(L"%s: WM_INPUTLANGCHANGE lParam=%x wParam=%x\n", data->WndName, lParam, wParam);
131  //Pass message to defwindowproc
132  }
133  else if(uMsg == WM_INPUTLANGCHANGEREQUEST)
134  {
135  FormatMsg(L"%s: WM_INPUTLANGCHANGEREQUEST lParam=%x wParam=%x\n", data->WndName, lParam, wParam);
137  //Pass message to defwindowproc
138  }
139 
140  return ( CallWindowProc( data->OrigProc, hwnd, uMsg, wParam, lParam) );
141 }
142 
144 {
145  WND_DATA *data = HeapAlloc(GetProcessHeap(), 0, sizeof(WND_DATA));
147  wcsncpy(data->WndName, Name, 25);
149  return;
150 }
151 
153 {
154  DWORD ret = 0;
155 
157  ret |= KLF_REORDER;
158 
160  ret |= KLF_RESET;
161 
163  ret |= KLF_SHIFTLOCK;
164 
167 
168  return ret;
169 
170 }
171 
173 {
174  DWORD ret = 0;
175 
177  ret |= KLF_ACTIVATE;
178 
180  ret |= KLF_NOTELLSHELL;
181 
183  ret |= KLF_REORDER;
184 
186  ret |= KLF_REPLACELANG;
187 
190 
193 
194  return ret;
195 }
196 
198 {
199  WCHAR Buf[255];
200  UINT ret;
201 
202  GetWindowText(GetDlgItem(hDlg, IDC_DELAY), Buf, sizeof(Buf));
203 
204  swscanf(Buf, L"%d", &ret);
205 
206  return ret*1000;
207 }
208 
210 {
211  int n;
212  HWND hList;
213  hList = GetDlgItem(hDlg, IDC_LIST);
214  if((n = SendMessage(hList, LB_GETCURSEL, 0, 0)) != LB_ERR)
215  return (HKL) SendMessage(hList, LB_GETITEMDATA, n, 0);
216  else return INVALID_HANDLE_VALUE;
217 }
218 
220 {
221 
223  return GetSelectedLayout(hDlg);
224  else if(IsDlgButtonChecked(hDlg, IDC_HKL_NEXT))
225  return (HKL)HKL_NEXT;
226 
227  return (HKL)HKL_PREV;
228 
229 }
230 
231 
232 /***************************************************
233  * MainDialogProc *
234  ***************************************************/
235 
237  UINT Msg,
238  WPARAM wParam,
239  LPARAM lParam)
240 {
241  HKL hKl;
242 
243  switch (Msg)
244  {
245  case WM_INITDIALOG:
246  {
247  WCHAR Buf[255];
248  UpdateData(hDlg);
249  hMainDlg = hDlg;
250 
251  SubclassWnd(GetDlgItem(hDlg, IDC_LIST), L"List");
252  SubclassWnd(GetDlgItem(hDlg, IDC_EDIT1), L"Edit1");
253  SubclassWnd(GetDlgItem(hDlg, IDC_KLID), L"Klid");
254  SubclassWnd(GetDlgItem(hDlg, ID_CANCEL), L"CancelB");
255  SubclassWnd(GetDlgItem(hDlg, IDC_ACTIVATE), L"ActivateB");
256  SubclassWnd(GetDlgItem(hDlg, IDC_REFRESH), L"RefreshB");
257  SubclassWnd(GetDlgItem(hDlg, IDC_UNLOAD), L"UnloadB");
258  SubclassWnd(GetDlgItem(hDlg, IDC_LOAD), L"LoadB");
259 
261  SetWindowText(GetDlgItem(hDlg, IDC_KLID), L"00000419");
262 
263  swprintf(Buf, L"Current thread id: %d", GetCurrentThreadId());
265 
266  SetWindowText(GetDlgItem(hDlg, IDC_DELAY), L"0");
267 
268  return 0;
269  } /* WM_INITDIALOG */
270 
271  case WM_COMMAND:
272  {
273  switch(LOWORD(wParam))
274  {
275  case ID_CANCEL:
276  {
277  EndDialog(hDlg, ERROR_CANCELLED);
278  break;
279  }
280 
281  case IDC_ACTIVATE:
282  {
283  if((hKl = GetActivateHandle(hDlg)) != INVALID_HANDLE_VALUE)
284  {
286  if(!(hKl = ActivateKeyboardLayout(hKl, GetActivateFlags(hDlg))))
287  FormatBox(hDlg, MB_ICONERROR, L"Error",
288  L"ActivateKeyboardLayout() failed. %d", GetLastError());
289  else UpdateData(hDlg);
290  //FormatBox(hDlg, 0, L"Activated", L"Prev - %x, err - %d.", hKl,
291  // GetLastError());
292  }
293  else MessageBox(hDlg, L"No item selected", L"Error", MB_ICONERROR);
294  break;
295  }
296 
297  case IDC_UNLOAD:
298  {
299  if((hKl = GetSelectedLayout(hDlg)) != INVALID_HANDLE_VALUE)
300  {
302  if(!UnloadKeyboardLayout(hKl))
303  FormatBox(hDlg, MB_ICONERROR, L"Error",
304  L"UnloadKeyboardLayout() failed. %d",
305  GetLastError());
306  else UpdateData(hDlg);
307  }
308  else MessageBox(hDlg, L"No item selected", L"Error", MB_ICONERROR);
309  break;
310  }
311 
312  case IDC_LOAD:
313  {
314  WCHAR buf[255];
315  GetWindowText(GetDlgItem(hDlg, IDC_KLID), buf, sizeof(buf));
317  if(!LoadKeyboardLayout(buf, GetLoadFlags(hDlg)))
318  FormatBox(hDlg, MB_ICONERROR, L"Error",
319  L"LoadKeyboardLayout() failed. %d",
320  GetLastError());
321  else UpdateData(hDlg);
322  break;
323  }
324 
325  case IDC_REFRESH:
326  {
327  UpdateData(hDlg);
328  break;
329  }
330 
331  case IDC_NEWTHREAD:
332  {
333  if(!CreateThread(NULL, 0, ThreadProc, NULL, 0, NULL))
334  {
335  FormatBox(hDlg, MB_ICONERROR, L"Error!",
336  L"Can not create thread (%d).", GetLastError());
337  }
338  }
339 
340  case IDC_LIST:
341  {
342  if(HIWORD(wParam) == LBN_SELCHANGE)
343  {
344  WCHAR buf[25];
345  if((hKl = GetSelectedLayout(hDlg)) != NULL)
346  {
347  swprintf(buf, L"%x", hKl);
349  }
350  }
351  break;
352  }
353 
354  }
355 
356  return TRUE;
357  } /* WM_COMMAND */
358 
359 
360  case WM_INPUTLANGCHANGE:
361  {
362  FormatMsg(L"dlg WM_INPUTLANGCHANGE lParam=%x wParam=%x\n", lParam, wParam);
363  return FALSE;
364  }
365 
366  case WM_INPUTLANGCHANGEREQUEST:
367  {
368  FormatMsg(L"dlg WM_INPUTLANGCHANGEREQUEST lParam=%x wParam=%x\n", lParam, wParam);
369  UpdateData(hDlg);
370  return FALSE;
371  }
372 
373  case WM_CLOSE:
374  {
375  EndDialog(hDlg, ERROR_CANCELLED);
376  return TRUE;
377  } /* WM_CLOSE */
378 
379  default:
380  return FALSE;
381  }
382 
383 }
384 
385 
386 
387 
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
Definition: kbdlayout.c:40
#define KLF_REORDER
Definition: winuser.h:114
#define LB_SETCURSEL
Definition: winuser.h:2045
#define CallWindowProc
Definition: winuser.h:5636
void FreeKlList(HKL *list)
Definition: kbdlayout.c:67
HKL GetSelectedLayout(HWND hDlg)
Definition: kbdlayout.c:209
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define MAKEINTRESOURCE
Definition: winuser.h:591
DWORD GetLoadFlags(HWND hDlg)
Definition: kbdlayout.c:172
HKL WINAPI ActivateKeyboardLayout(_In_ HKL, _In_ UINT)
void SubclassWnd(HWND hWnd, WCHAR *Name)
Definition: kbdlayout.c:143
#define TRUE
Definition: types.h:120
#define KL_NAMELENGTH
Definition: winuser.h:122
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
#define LB_ADDSTRING
Definition: winuser.h:2013
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define KLF_ACTIVATE
Definition: winuser.h:111
DWORD GetActivateFlags(HWND hDlg)
Definition: kbdlayout.c:152
#define LB_GETITEMDATA
Definition: winuser.h:2023
WNDPROC OrigProc
Definition: kbdlayout.c:24
#define IDC_REFRESH
Definition: resource.h:31
struct @1591 Msg[]
#define GetKeyboardLayoutName
Definition: winuser.h:5687
#define CALLBACK
Definition: compat.h:27
HWND hWnd
Definition: settings.c:17
GLdouble n
Definition: glext.h:7729
#define IDL_KLF_SUBSTITUTE_OK
Definition: resource.h:26
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
#define KLF_NOTELLSHELL
Definition: winuser.h:116
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
HKL GetActivateHandle(HWND hDlg)
Definition: kbdlayout.c:219
UINT_PTR WPARAM
Definition: windef.h:207
#define IDC_HANDLE
Definition: resource.h:32
char * LPSTR
Definition: xmlstorage.h:182
#define LBN_SELCHANGE
Definition: winuser.h:2057
int32_t INT
Definition: typedefs.h:56
#define SetWindowLongPtr
Definition: treelist.c:70
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
#define IDC_ACTIVATE
Definition: resource.h:13
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define IDC_LOAD
Definition: resource.h:30
#define GetWindowText
Definition: winuser.h:5699
#define LoadKeyboardLayout
Definition: winuser.h:5717
HINSTANCE hInst
Definition: kbdlayout.c:19
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HINSTANCE hInstance
Definition: charmap.c:20
#define LB_RESETCONTENT
Definition: winuser.h:2037
#define va_end(ap)
Definition: acmsvcex.h:90
struct _WND_DATA WND_DATA
#define LB_ERR
Definition: winuser.h:2407
#define IDD_MAINDIALOG
Definition: resource.h:5
#define ID_CANCEL
Definition: resource.h:6
#define GWLP_USERDATA
Definition: treelist.c:63
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:136
LRESULT CALLBACK WndSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: kbdlayout.c:123
smooth NULL
Definition: ftsmooth.c:416
#define IDC_LIST
Definition: resource.h:93
LONG_PTR LPARAM
Definition: windef.h:208
char * va_list
Definition: acmsvcex.h:78
#define IDL_KLF_NOTELLSHELL
Definition: resource.h:22
int GetKlList(HKL **list)
Definition: kbdlayout.c:55
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
DWORD WINAPI GetCurrentThreadId(VOID)
Definition: thread.c:458
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define KLF_SUBSTITUTE_OK
Definition: winuser.h:112
#define IDC_KLF_SHIFTLOCK
Definition: resource.h:17
#define IDC_KLF_SETFORPROCESS
Definition: resource.h:16
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define IDL_KLF_REORDER
Definition: resource.h:24
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI UnloadKeyboardLayout(_In_ HKL)
#define IDC_EDIT1
Definition: resource.h:7
UINT WINAPI GetKeyboardLayoutList(_In_ int nBuff, _Out_writes_to_opt_(nBuff, return) HKL FAR *lpList)
#define IDL_KLF_SETFORPROCESS
Definition: resource.h:27
#define WM_CLOSE
Definition: winuser.h:1603
#define swprintf(buf, format,...)
Definition: sprintf.c:56
#define WINAPI
Definition: msvc.h:8
void UpdateData(HWND hDlg)
Definition: kbdlayout.c:73
void FormatBox(HWND hWnd, DWORD Flags, WCHAR *Caption, WCHAR *Format,...)
Definition: kbdlayout.c:112
unsigned long DWORD
Definition: ntddk_ex.h:95
#define IDC_UNLOAD
Definition: resource.h:12
#define IDC_KLID
Definition: resource.h:23
#define IDC_KLF_RESET
Definition: resource.h:15
#define LB_SETITEMDATA
Definition: winuser.h:2047
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define IDC_DELAY
Definition: resource.h:11
#define IDC_KLF_REORDER
Definition: resource.h:14
#define DialogBoxParam
Definition: winuser.h:5665
int ret
static const WCHAR L[]
Definition: oid.c:1250
#define MB_ICONERROR
Definition: winuser.h:781
#define IDC_NEWTHREAD
Definition: resource.h:34
Definition: _list.h:228
#define MessageBox
Definition: winuser.h:5723
#define WM_COMMAND
Definition: winuser.h:1722
UINT_PTR HKL
Definition: msctf.idl:101
#define IDC_FROMLIST
Definition: resource.h:18
#define IDL_KLF_REPLACELANG
Definition: resource.h:25
#define GWLP_WNDPROC
Definition: treelist.c:66
INT_PTR(CALLBACK * DLGPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2870
#define KLF_REPLACELANG
Definition: winuser.h:115
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2880
HWND hList
Definition: livecd.c:10
#define IDC_HKL_NEXT
Definition: resource.h:19
UINT GetDelayMilliseconds(HWND hDlg)
Definition: kbdlayout.c:197
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
_CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest, size_t _Count, const wchar_t *_Format, va_list _Args)
#define ERROR_CANCELLED
Definition: winerror.h:726
#define IDL_KLF_ACTIVATE
Definition: resource.h:21
#define HKL_NEXT
Definition: winuser.h:109
#define KLF_SETFORPROCESS
Definition: winuser.h:117
LRESULT MainDialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: kbdlayout.c:236
PKEYBOARD_LAYOUT GetKeyboardLayout()
Definition: utils.c:194
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define SetWindowText
Definition: winuser.h:5758
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define LB_GETCURSEL
Definition: winuser.h:2021
unsigned int UINT
Definition: ndis.h:50
#define HKL_PREV
Definition: winuser.h:110
#define IDC_FROMEDIT
Definition: resource.h:29
#define SendMessage
Definition: winuser.h:5744
#define HIWORD(l)
Definition: typedefs.h:246
#define IDC_CURTHREAD
Definition: resource.h:33
BOOL WINAPI CheckRadioButton(_In_ HWND, _In_ int, _In_ int, _In_ int)
#define GetWindowLongPtr
Definition: treelist.c:73
LONG_PTR LRESULT
Definition: windef.h:209
void FormatMsg(WCHAR *format,...)
Definition: kbdlayout.c:102
_Check_return_ _CRTIMP int __cdecl swscanf(_In_z_ const wchar_t *_Src, _In_z_ _Scanf_format_string_ const wchar_t *_Format,...)
#define IDC_ACTIVE
Definition: resource.h:9
#define WM_INITDIALOG
Definition: winuser.h:1721
DWORD WINAPI ThreadProc(LPVOID lpParam)
Definition: kbdlayout.c:28
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
HWND hMainDlg
Definition: kbdlayout.c:20
#define HeapFree(x, y, z)
Definition: compat.h:402