2016-08-07 13:07:23 +00:00
|
|
|
#ifndef _INPUT_H
|
|
|
|
#define _INPUT_H
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
#include <winnls.h>
|
|
|
|
#include <winreg.h>
|
|
|
|
#include <winuser.h>
|
2016-08-07 23:28:50 +00:00
|
|
|
#include <wingdi.h>
|
2016-08-07 13:07:23 +00:00
|
|
|
#include <commctrl.h>
|
2016-08-07 23:28:50 +00:00
|
|
|
#include <wchar.h>
|
|
|
|
#include <strsafe.h>
|
|
|
|
#include <stdlib.h>
|
2016-08-07 13:07:23 +00:00
|
|
|
|
|
|
|
#include "resource.h"
|
|
|
|
|
|
|
|
typedef LONG (CALLBACK *CPLAPPLET_PROC)(VOID);
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int idIcon;
|
|
|
|
int idName;
|
|
|
|
int idDescription;
|
|
|
|
CPLAPPLET_PROC AppletProc;
|
|
|
|
} APPLET, *PAPPLET;
|
|
|
|
|
|
|
|
extern HINSTANCE hApplet;
|
|
|
|
|
|
|
|
// Character Count of a layout ID like "00000409"
|
|
|
|
#define CCH_LAYOUT_ID 8
|
|
|
|
|
|
|
|
// Maximum Character Count of a ULONG in decimal
|
|
|
|
#define CCH_ULONG_DEC 10
|
|
|
|
|
2016-08-07 23:28:50 +00:00
|
|
|
#define MAX_STR_LEN 256
|
|
|
|
|
2016-08-07 13:07:23 +00:00
|
|
|
/* input.c */
|
|
|
|
VOID
|
2016-08-07 23:28:50 +00:00
|
|
|
InitPropSheetPage(PROPSHEETPAGE *page, WORD idDlg, DLGPROC DlgProc);
|
2016-08-07 13:07:23 +00:00
|
|
|
|
2016-08-07 23:28:50 +00:00
|
|
|
/* settings_dialog.c */
|
2016-08-07 13:07:23 +00:00
|
|
|
INT_PTR CALLBACK
|
2016-08-07 23:28:50 +00:00
|
|
|
SettingsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
2016-08-07 13:07:23 +00:00
|
|
|
|
2016-08-07 23:28:50 +00:00
|
|
|
void ShowLastWin32Error(HWND hWndOwner);
|
2016-08-07 13:07:23 +00:00
|
|
|
|
2016-08-07 23:28:50 +00:00
|
|
|
static inline WCHAR*
|
|
|
|
DublicateString(const WCHAR *pszString)
|
|
|
|
{
|
|
|
|
WCHAR *pszDublicate;
|
|
|
|
size_t size;
|
2016-08-07 13:07:23 +00:00
|
|
|
|
2016-08-07 23:28:50 +00:00
|
|
|
size = (wcslen(pszString) + 1) * sizeof(WCHAR);
|
2016-08-07 13:07:23 +00:00
|
|
|
|
2016-08-07 23:28:50 +00:00
|
|
|
pszDublicate = (WCHAR*) malloc(size);
|
|
|
|
if (pszDublicate != NULL)
|
|
|
|
{
|
|
|
|
StringCbCopyW(pszDublicate, size, pszString);
|
|
|
|
}
|
2016-08-07 13:07:23 +00:00
|
|
|
|
2016-08-07 23:28:50 +00:00
|
|
|
return pszDublicate;
|
|
|
|
}
|
2016-08-07 13:07:23 +00:00
|
|
|
|
|
|
|
#endif /* _INPUT_H */
|