Swap Mouse Button
1 |
|
RegOpenKeyEx
/RegQueryValueEx
/RegSetValueEx
is register table function.RegCloseKey
when function above failed release handler.SwapMouseButton
used to control which button’s left right.
LPCTSTR
L
Long no actual meaningP
pointerC
constantT
base onUNICODE
macro, definechar
orwchar_t
STR
string char*
So LPCTSTR
almost const char*
If macro not define UNICODE
, lead to
const char* value can’t initial LPCTSTR instance class.
Solution
1 | #include <tchar.h> |
or1
LPCWSTR SubKey = L"Control Panel\\Mouse";
_T("ABC")
the letter in _T()
obtain 2 bytes same as chinese characters.