ReactOS  0.4.12-dev-685-gf36cbf7
main.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS On-Screen Keyboard
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: base/applications/osk/main.c
5  * PURPOSE: On-screen keyboard.
6  * PROGRAMMERS: Denis ROBERT
7  */
8 
9 /* INCLUDES *******************************************************************/
10 
11 #include "osk.h"
12 #include "settings.h"
13 
14 /* GLOBALS ********************************************************************/
15 
17 
18 /* Functions */
19 int OSK_SetImage(int IdDlgItem, int IdResource);
20 int OSK_DlgInitDialog(HWND hDlg);
21 int OSK_DlgClose(void);
22 int OSK_DlgTimer(void);
23 BOOL OSK_DlgCommand(WPARAM wCommand, HWND hWndControl);
25 
28 
29 /* FUNCTIONS ******************************************************************/
30 
31 /***********************************************************************
32  *
33  * OSK_SetImage
34  *
35  * Set an image on a button
36  */
37 int OSK_SetImage(int IdDlgItem, int IdResource)
38 {
39  HICON hIcon;
40  HWND hWndItem;
41 
43  IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
44  if (hIcon == NULL)
45  return FALSE;
46 
47  hWndItem = GetDlgItem(Globals.hMainWnd, IdDlgItem);
48  if (hWndItem == NULL)
49  {
51  return FALSE;
52  }
53 
55 
56  /* The system automatically deletes these resources when the process that created them terminates (MSDN) */
57 
58  return TRUE;
59 }
60 
61 /***********************************************************************
62  *
63  * OSK_WarningProc
64  *
65  * Function handler for the warning dialog box on startup
66  */
68 {
70 
71  switch (Msg)
72  {
73  case WM_INITDIALOG:
74  {
75  return TRUE;
76  }
77 
78  case WM_COMMAND:
79  {
80  switch (LOWORD(wParam))
81  {
83  {
84  Globals.bShowWarning = !IsDlgButtonChecked(hDlg, IDC_SHOWWARNINGCHECK);
85  return TRUE;
86  }
87 
88  case IDOK:
89  case IDCANCEL:
90  {
91  EndDialog(hDlg, LOWORD(wParam));
92  return TRUE;
93  }
94  }
95  break;
96  }
97  }
98 
99  return FALSE;
100 }
101 
102 /***********************************************************************
103  *
104  * OSK_About
105  *
106  * Initializes the "About" dialog box
107  */
109 {
111  WCHAR szAuthors[MAX_BUFF];
112  HICON OSKIcon;
113 
114  /* Load the icon */
116 
117  /* Load the strings into the "About" dialog */
119  LoadStringW(Globals.hInstance, STRING_AUTHORS, szAuthors, countof(szAuthors));
120 
121  /* Finally, execute the "About" dialog by using the Shell routine */
122  ShellAboutW(Globals.hMainWnd, szTitle, szAuthors, OSKIcon);
123 
124  /* Once done, destroy the icon */
125  DestroyIcon(OSKIcon);
126 }
127 
128 
129 /***********************************************************************
130  *
131  * OSK_DlgInitDialog
132  *
133  * Handling of WM_INITDIALOG
134  */
136 {
138  HMONITOR monitor;
140  POINT Pt;
141  RECT rcWindow;
142 
143  /* Save handle */
144  Globals.hMainWnd = hDlg;
145 
146  /* Check the checked menu item before displaying the modal box */
147  if (Globals.bIsEnhancedKeyboard)
148  {
149  /* Enhanced keyboard dialog chosen, set the respective menu item as checked */
152  }
153  else
154  {
155  /* Standard keyboard dialog chosen, set the respective menu item as checked */
158  }
159 
160  /* Set the application's icon */
163  if (hIcon || hIconSm)
164  {
165  /* Set the window icons (they are deleted when the process terminates) */
168  }
169 
170  /* Get screen info */
171  memset(&Pt, 0, sizeof(Pt));
172  monitor = MonitorFromPoint(Pt, MONITOR_DEFAULTTOPRIMARY);
173  info.cbSize = sizeof(info);
174  GetMonitorInfoW(monitor, &info);
175 
176  /* Move the dialog on the bottom of main screen */
177  GetWindowRect(hDlg, &rcWindow);
178  MoveWindow(hDlg,
179  (info.rcMonitor.left + info.rcMonitor.right) / 2 - // Center of screen
180  (rcWindow.right - rcWindow.left) / 2, // - half size of dialog
181  info.rcMonitor.bottom - // Bottom of screen
182  (rcWindow.bottom - rcWindow.top), // - size of window
183  rcWindow.right - rcWindow.left, // Width
184  rcWindow.bottom - rcWindow.top, // Height
185  TRUE);
186 
187  /* Set icon on visual buttons */
204 
205  /* Create a green brush for leds */
206  Globals.hBrushGreenLed = CreateSolidBrush(RGB(0, 255, 0));
207 
208  /* Set a timer for periodics tasks */
209  Globals.iTimer = SetTimer(hDlg, 0, 200, NULL);
210 
211  return TRUE;
212 }
213 
214 /***********************************************************************
215  *
216  * OSK_DlgClose
217  *
218  * Handling of WM_CLOSE
219  */
220 int OSK_DlgClose(void)
221 {
223 
224  /* Release Ctrl, Shift, Alt keys */
225  OSK_ReleaseKey(SCAN_CODE_44); // Left shift
226  OSK_ReleaseKey(SCAN_CODE_57); // Right shift
227  OSK_ReleaseKey(SCAN_CODE_58); // Left ctrl
228  OSK_ReleaseKey(SCAN_CODE_60); // Left alt
229  OSK_ReleaseKey(SCAN_CODE_62); // Right alt
230  OSK_ReleaseKey(SCAN_CODE_64); // Right ctrl
231 
232  /* delete GDI objects */
233  if (Globals.hBrushGreenLed) DeleteObject(Globals.hBrushGreenLed);
234 
235  /* Save the settings to the registry hive */
237 
238  return TRUE;
239 }
240 
241 /***********************************************************************
242  *
243  * OSK_DlgTimer
244  *
245  * Handling of WM_TIMER
246  */
247 int OSK_DlgTimer(void)
248 {
249  /* FIXME: To be deleted when ReactOS will support WS_EX_NOACTIVATE */
250  HWND hWndActiveWindow;
251 
252  hWndActiveWindow = GetForegroundWindow();
253  if (hWndActiveWindow != NULL && hWndActiveWindow != Globals.hMainWnd)
254  {
255  Globals.hActiveWnd = hWndActiveWindow;
256  }
257 
258  /* Always redraw leds because it can be changed by the real keyboard) */
262 
263  return TRUE;
264 }
265 
266 /***********************************************************************
267  *
268  * OSK_DlgCommand
269  *
270  * All handling of dialog command
271  */
272 BOOL OSK_DlgCommand(WPARAM wCommand, HWND hWndControl)
273 {
274  WORD ScanCode;
275  INPUT Input;
276  BOOL bExtendedKey;
277  BOOL bKeyDown;
278  BOOL bKeyUp;
279  LONG WindowStyle;
280 
281  /* FIXME: To be deleted when ReactOS will support WS_EX_NOACTIVATE */
282  if (Globals.hActiveWnd)
283  {
284  MSG msg;
285 
286  SetForegroundWindow(Globals.hActiveWnd);
287  while (PeekMessageW(&msg, 0, 0, 0, PM_REMOVE))
288  {
291  }
292  }
293 
294  /* KeyDown and/or KeyUp ? */
295  WindowStyle = GetWindowLongW(hWndControl, GWL_STYLE);
296  if ((WindowStyle & BS_AUTOCHECKBOX) == BS_AUTOCHECKBOX)
297  {
298  /* 2-states key like Shift, Alt, Ctrl, ... */
299  if (SendMessageW(hWndControl, BM_GETCHECK, 0, 0) == BST_CHECKED)
300  {
301  bKeyDown = TRUE;
302  bKeyUp = FALSE;
303  }
304  else
305  {
306  bKeyDown = FALSE;
307  bKeyUp = TRUE;
308  }
309  }
310  else
311  {
312  /* Other key */
313  bKeyDown = TRUE;
314  bKeyUp = TRUE;
315  }
316 
317  /* Extended key ? */
318  ScanCode = wCommand;
319  if (ScanCode & 0x0200)
320  bExtendedKey = TRUE;
321  else
322  bExtendedKey = FALSE;
323  ScanCode &= 0xFF;
324 
325  /* Press and release the key */
326  if (bKeyDown)
327  {
328  Input.type = INPUT_KEYBOARD;
329  Input.ki.wVk = 0;
330  Input.ki.wScan = ScanCode;
331  Input.ki.time = GetTickCount();
332  Input.ki.dwExtraInfo = GetMessageExtraInfo();
333  Input.ki.dwFlags = KEYEVENTF_SCANCODE;
334  if (bExtendedKey) Input.ki.dwFlags |= KEYEVENTF_EXTENDEDKEY;
335  SendInput(1, &Input, sizeof(Input));
336  }
337 
338  if (bKeyUp)
339  {
340  Input.type = INPUT_KEYBOARD;
341  Input.ki.wVk = 0;
342  Input.ki.wScan = ScanCode;
343  Input.ki.time = GetTickCount();
344  Input.ki.dwExtraInfo = GetMessageExtraInfo();
345  Input.ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
346  if (bExtendedKey) Input.ki.dwFlags |= KEYEVENTF_EXTENDEDKEY;
347  SendInput(1, &Input, sizeof(Input));
348  }
349 
350  return TRUE;
351 }
352 
353 /***********************************************************************
354  *
355  * OSK_ReleaseKey
356  *
357  * Release the key of ID wCommand
358  */
360 {
361  INPUT Input;
362  BOOL bExtendedKey;
363  LONG WindowStyle;
364  HWND hWndControl;
365 
366  /* Is it a 2-states key ? */
367  hWndControl = GetDlgItem(Globals.hMainWnd, ScanCode);
368  WindowStyle = GetWindowLongW(hWndControl, GWL_STYLE);
369  if ((WindowStyle & BS_AUTOCHECKBOX) != BS_AUTOCHECKBOX) return FALSE;
370 
371  /* Is the key down ? */
372  if (SendMessageW(hWndControl, BM_GETCHECK, 0, 0) != BST_CHECKED) return TRUE;
373 
374  /* Extended key ? */
375  if (ScanCode & 0x0200)
376  bExtendedKey = TRUE;
377  else
378  bExtendedKey = FALSE;
379  ScanCode &= 0xFF;
380 
381  /* Release the key */
382  Input.type = INPUT_KEYBOARD;
383  Input.ki.wVk = 0;
384  Input.ki.wScan = ScanCode;
385  Input.ki.time = GetTickCount();
386  Input.ki.dwExtraInfo = GetMessageExtraInfo();
387  Input.ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
388  if (bExtendedKey) Input.ki.dwFlags |= KEYEVENTF_EXTENDEDKEY;
389  SendInput(1, &Input, sizeof(Input));
390 
391  return TRUE;
392 }
393 
394 /***********************************************************************
395  *
396  * OSK_DlgProc
397  */
399 {
400  switch (msg)
401  {
402  case WM_INITDIALOG:
403  OSK_DlgInitDialog(hDlg);
404  return TRUE;
405 
406  case WM_TIMER:
407  OSK_DlgTimer();
408  return TRUE;
409 
410  case WM_CTLCOLORSTATIC:
411  if ((HWND)lParam == GetDlgItem(hDlg, IDC_LED_NUM))
412  {
413  if (GetKeyState(VK_NUMLOCK) & 0x0001)
414  return (INT_PTR)Globals.hBrushGreenLed;
415  else
417  }
418  if ((HWND)lParam == GetDlgItem(hDlg, IDC_LED_CAPS))
419  {
420  if (GetKeyState(VK_CAPITAL) & 0x0001)
421  return (INT_PTR)Globals.hBrushGreenLed;
422  else
424  }
425  if ((HWND)lParam == GetDlgItem(hDlg, IDC_LED_SCROLL))
426  {
427  if (GetKeyState(VK_SCROLL) & 0x0001)
428  return (INT_PTR)Globals.hBrushGreenLed;
429  else
431  }
432  break;
433 
434  case WM_COMMAND:
435  switch (LOWORD(wParam))
436  {
437  case IDCANCEL:
438  {
439  EndDialog(hDlg, FALSE);
440  break;
441  }
442 
443  case IDM_EXIT:
444  {
445  EndDialog(hDlg, FALSE);
446  break;
447  }
448 
449  case IDM_ENHANCED_KB:
450  {
451  if (!Globals.bIsEnhancedKeyboard)
452  {
453  /*
454  The user attempted to switch to enhanced keyboard dialog type.
455  Set the member value as TRUE, destroy the dialog and save the data configuration into the registry.
456  */
457  Globals.bIsEnhancedKeyboard = TRUE;
458  EndDialog(hDlg, FALSE);
460 
461  /* Change the condition of enhanced keyboard item menu to checked */
464 
465  /* Finally, display the dialog modal box with the enhanced keyboard dialog */
469  OSK_DlgProc);
470  }
471 
472  break;
473  }
474 
475  case IDM_STANDARD_KB:
476  {
477  if (Globals.bIsEnhancedKeyboard)
478  {
479  /*
480  The user attempted to switch to standard keyboard dialog type.
481  Set the member value as FALSE, destroy the dialog and save the data configuration into the registry.
482  */
483  Globals.bIsEnhancedKeyboard = FALSE;
484  EndDialog(hDlg, FALSE);
486 
487  /* Change the condition of standard keyboard item menu to checked */
490 
491  /* Finally, display the dialog modal box with the standard keyboard dialog */
495  OSK_DlgProc);
496  }
497 
498  break;
499  }
500 
501  case IDM_ABOUT:
502  {
503  OSK_About();
504  break;
505  }
506 
507  default:
509  break;
510  }
511  break;
512 
513  case WM_CLOSE:
514  OSK_DlgClose();
515  break;
516  }
517 
518  return 0;
519 }
520 
521 /***********************************************************************
522  *
523  * WinMain
524  */
526  HINSTANCE prev,
527  LPWSTR cmdline,
528  int show)
529 {
530  HANDLE hMutex;
531  INT LayoutResource;
532 
536 
537  ZeroMemory(&Globals, sizeof(Globals));
539 
540  /* Load the settings from the registry hive */
542 
543  /* If the member of the struct (bShowWarning) is set then display the dialog box */
544  if (Globals.bShowWarning)
545  {
547  }
548 
549  /* Before initializing the dialog execution, check if the chosen keyboard type is standard or enhanced */
550  if (Globals.bIsEnhancedKeyboard)
551  {
552  LayoutResource = MAIN_DIALOG_ENHANCED_KB;
553  }
554  else
555  {
556  LayoutResource = MAIN_DIALOG_STANDARD_KB;
557  }
558 
559  /* Rry to open a mutex for a single instance */
561 
562  if (!hMutex)
563  {
564  /* Mutex doesn’t exist. This is the first instance so create the mutex. */
565  hMutex = CreateMutexW(NULL, FALSE, L"osk");
566 
567  /* Create the modal box based on the configuration registry */
569  MAKEINTRESOURCEW(LayoutResource),
571  OSK_DlgProc);
572 
573  /* Delete the mutex */
574  if (hMutex) CloseHandle(hMutex);
575  }
576  else
577  {
578  /* Programme already launched */
579 
580  /* Delete the mutex */
582 
583  ExitProcess(0);
584  }
585 
586  return 0;
587 }
588 
589 /* EOF */
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define SCAN_CODE_30
Definition: osk_res.h:89
HMONITOR WINAPI MonitorFromPoint(POINT, DWORD)
INT_PTR APIENTRY OSK_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: main.c:398
int OSK_DlgClose(void)
Definition: main.c:220
BOOL WINAPI TranslateMessage(_In_ const MSG *)
static HICON
Definition: imagelist.c:84
#define TRUE
Definition: types.h:120
#define SCAN_CODE_60
Definition: osk_res.h:117
#define IDOK
Definition: winuser.h:824
#define CloseHandle
Definition: compat.h:398
NOTEPAD_GLOBALS Globals
Definition: main.c:29
#define LR_SHARED
Definition: winuser.h:1090
#define IMAGE_ICON
Definition: winuser.h:212
ULONG ScanCode
Definition: api.c:39
#define MF_BYCOMMAND
Definition: winuser.h:202
#define STRING_OSK
Definition: osk_res.h:51
#define IDM_ABOUT
Definition: resource.h:29
#define SCAN_CODE_128
Definition: osk_res.h:166
#define KEYEVENTF_KEYUP
Definition: winuser.h:1092
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
#define IDI_PG_UP
Definition: osk_res.h:26
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1748
#define MAIN_DIALOG_STANDARD_KB
Definition: osk_res.h:10
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define CALLBACK
Definition: compat.h:27
#define IDI_OSK
Definition: osk_res.h:17
WCHAR szTitle[MAX_LOADSTRING]
Definition: main.c:38
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:445
Definition: arc.h:84
LONG top
Definition: windef.h:292
VOID WINAPI ExitProcess(IN UINT uExitCode)
Definition: proc.c:1517
#define IDI_RIGHT
Definition: osk_res.h:30
#define SCAN_CODE_64
Definition: osk_res.h:120
#define ZeroMemory
Definition: winbase.h:1635
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
#define SM_CYSMICON
Definition: winuser.h:1003
#define IDC_SHOWWARNINGCHECK
Definition: resource.h:25
#define SCAN_CODE_62
Definition: osk_res.h:119
#define SCAN_CODE_79
Definition: osk_res.h:123
#define IDI_TOP
Definition: osk_res.h:29
#define IDI_TAB
Definition: osk_res.h:19
TCHAR * cmdline
Definition: stretchblt.cpp:32
LONG left
Definition: windef.h:291
int32_t INT_PTR
Definition: typedefs.h:62
LONG right
Definition: windef.h:293
#define IDI_SHIFT
Definition: osk_res.h:22
#define BM_SETIMAGE
Definition: winuser.h:1883
#define MUTEX_ALL_ACCESS
Definition: winbase.h:158
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int32_t INT
Definition: typedefs.h:56
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
UINT_PTR WPARAM
Definition: windef.h:207
#define ICON_SMALL
Definition: tnclass.cpp:48
struct _test_info info[]
Definition: SetCursorPos.c:19
HINSTANCE hInstance
Definition: main.h:55
int OSK_DlgInitDialog(HWND hDlg)
Definition: main.c:135
#define SCAN_CODE_80
Definition: osk_res.h:124
#define IDC_LED_CAPS
Definition: osk_res.h:13
#define INPUT_KEYBOARD
Definition: winable.h:10
#define SCAN_CODE_16
Definition: osk_res.h:75
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
#define IDI_LEFT
Definition: osk_res.h:28
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
long LONG
Definition: pedump.c:60
LONG_PTR LPARAM
Definition: windef.h:208
int OSK_SetImage(int IdDlgItem, int IdResource)
Definition: main.c:37
#define countof(x)
Definition: main.h:34
#define IDI_BACK
Definition: osk_res.h:18
#define SCAN_CODE_57
Definition: osk_res.h:115
#define STRING_AUTHORS
Definition: osk_res.h:52
HANDLE WINAPI CopyImage(_In_ HANDLE, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:1956
#define IDI_MENU
Definition: osk_res.h:24
#define IDI_HOME
Definition: osk_res.h:25
HANDLE WINAPI DECLSPEC_HOTPATCH OpenMutexW(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCWSTR lpName)
Definition: synch.c:551
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define SCAN_CODE_86
Definition: osk_res.h:129
UINT msg
Definition: msvc.h:92
smooth NULL
Definition: ftsmooth.c:416
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:622
LPARAM WINAPI GetMessageExtraInfo(void)
Definition: message.c:1315
#define BS_AUTOCHECKBOX
Definition: pedump.c:654
#define SCAN_CODE_58
Definition: osk_res.h:116
#define BM_GETCHECK
Definition: winuser.h:1879
HANDLE hMutex
Definition: mutex.c:11
BOOL LoadDataFromRegistry()
Definition: settings.c:15
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define DialogBoxW(i, t, p, f)
Definition: winuser.h:4268
#define IDI_CAPS_LOCK
Definition: osk_res.h:20
SHORT WINAPI GetKeyState(_In_ int)
#define BLACK_BRUSH
Definition: wingdi.h:895
#define MAX_BUFF
Definition: main.h:35
#define IDM_STANDARD_KB
Definition: osk_res.h:35
#define MF_CHECKED
Definition: winuser.h:132
BOOL OSK_DlgCommand(WPARAM wCommand, HWND hWndControl)
Definition: main.c:272
unsigned int BOOL
Definition: ntddk_ex.h:94
#define IDM_ENHANCED_KB
Definition: osk_res.h:36
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define LR_DEFAULTSIZE
Definition: winuser.h:1084
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
#define WM_TIMER
Definition: winuser.h:1718
#define WM_CLOSE
Definition: winuser.h:1603
#define RGB(r, g, b)
Definition: wingdi.h:2918
int OSK_DlgTimer(void)
Definition: main.c:247
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
unsigned short WORD
Definition: ntddk_ex.h:93
int WINAPI GetSystemMetrics(_In_ int)
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HINSTANCE hInstance
Definition: main.c:36
#define IDC_LED_SCROLL
Definition: osk_res.h:14
#define SM_CXSMICON
Definition: winuser.h:1002
BOOL SaveDataToRegistry()
Definition: settings.c:80
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define IDI_REACTOS
Definition: osk_res.h:23
static const WCHAR L[]
Definition: oid.c:1250
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
#define SCAN_CODE_89
Definition: osk_res.h:130
#define WM_COMMAND
Definition: winuser.h:1716
INT_PTR CALLBACK OSK_WarningProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: main.c:67
#define MF_UNCHECKED
Definition: winuser.h:204
#define SCAN_CODE_15
Definition: osk_res.h:74
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
#define WINAPI
Definition: msvc.h:20
#define IDI_RETURN
Definition: osk_res.h:21
#define GWL_STYLE
Definition: winuser.h:846
#define LR_COPYFROMRESOURCE
Definition: winuser.h:1089
#define SCAN_CODE_127
Definition: osk_res.h:165
VOID OSK_About(VOID)
Definition: main.c:108
#define VK_SCROLL
Definition: winuser.h:2234
#define VK_NUMLOCK
Definition: winuser.h:2233
#define MAIN_DIALOG_ENHANCED_KB
Definition: osk_res.h:9
HICON hIcon
Definition: msconfig.c:44
#define SCAN_CODE_84
Definition: osk_res.h:127
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define VK_CAPITAL
Definition: winuser.h:2160
HANDLE WINAPI DECLSPEC_HOTPATCH CreateMutexW(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL, IN BOOL bInitialOwner, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:522
struct @1565 Msg[]
#define IDI_BOTTOM
Definition: osk_res.h:31
#define SCAN_CODE_43
Definition: osk_res.h:102
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
HWND WINAPI GetForegroundWindow(void)
Definition: ntwrapper.h:392
#define IDM_EXIT
Definition: resource.h:27
#define KEYEVENTF_EXTENDEDKEY
Definition: winuser.h:1091
#define BST_CHECKED
Definition: winuser.h:197
#define msg(x)
Definition: auth_time.c:54
#define IDD_WARNINGDIALOG_OSK
Definition: osk_res.h:49
HICON hIconSm
Definition: msconfig.c:44
BOOL WINAPI SetForegroundWindow(_In_ HWND)
LONG bottom
Definition: windef.h:294
int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cmdshow)
Definition: main.c:420
BOOL OSK_ReleaseKey(WORD ScanCode)
Definition: main.c:359
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
#define SCAN_CODE_85
Definition: osk_res.h:128
#define PM_REMOVE
Definition: winuser.h:1182
#define SCAN_CODE_44
Definition: osk_res.h:103
#define IDC_LED_NUM
Definition: osk_res.h:12
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define IDCANCEL
Definition: winuser.h:825
#define SCAN_CODE_83
Definition: osk_res.h:126
#define LR_DEFAULTCOLOR
Definition: winuser.h:1077
#define memset(x, y, z)
Definition: compat.h:39
HMENU WINAPI GetMenu(_In_ HWND)
HWND hMainWnd
Definition: main.h:56
#define WM_INITDIALOG
Definition: winuser.h:1715
#define IDI_PG_DOWN
Definition: osk_res.h:27
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
UINT WINAPI SendInput(UINT, LPINPUT, int)
Definition: ntwrapper.h:344
#define APIENTRY
Definition: api.h:79
#define ICON_BIG
Definition: tnclass.cpp:51
#define SCAN_CODE_129
Definition: osk_res.h:167