mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
regedit: Remove all Unicode macros in main.h.
This commit is contained in:
parent
182763f632
commit
82796c565e
4 changed files with 22 additions and 20 deletions
|
@ -388,7 +388,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
if (((int)wParam == TREE_WINDOW) && (g_pChildWnd != NULL)) {
|
if (((int)wParam == TREE_WINDOW) && (g_pChildWnd != NULL)) {
|
||||||
switch (((LPNMHDR)lParam)->code) {
|
switch (((LPNMHDR)lParam)->code) {
|
||||||
case TVN_ITEMEXPANDINGW:
|
case TVN_ITEMEXPANDINGW:
|
||||||
return !OnTreeExpanding(g_pChildWnd->hTreeWnd, (NMTREEVIEW*)lParam);
|
return !OnTreeExpanding(g_pChildWnd->hTreeWnd, (NMTREEVIEWW*)lParam);
|
||||||
case TVN_SELCHANGEDW:
|
case TVN_SELCHANGEDW:
|
||||||
OnTreeSelectionChanged(g_pChildWnd->hTreeWnd, g_pChildWnd->hListWnd,
|
OnTreeSelectionChanged(g_pChildWnd->hTreeWnd, g_pChildWnd->hListWnd,
|
||||||
((NMTREEVIEWW *)lParam)->itemNew.hItem, TRUE);
|
((NMTREEVIEWW *)lParam)->itemNew.hItem, TRUE);
|
||||||
|
|
|
@ -54,6 +54,8 @@ typedef struct tagHEXEDIT_INFO
|
||||||
INT nScrollPos; /* first visible line */
|
INT nScrollPos; /* first visible line */
|
||||||
} HEXEDIT_INFO;
|
} HEXEDIT_INFO;
|
||||||
|
|
||||||
|
const WCHAR szHexEditClass[] = {'H','e','x','E','d','i','t',0};
|
||||||
|
|
||||||
static inline LRESULT HexEdit_SetFont (HEXEDIT_INFO *infoPtr, HFONT hFont, BOOL redraw);
|
static inline LRESULT HexEdit_SetFont (HEXEDIT_INFO *infoPtr, HFONT hFont, BOOL redraw);
|
||||||
|
|
||||||
static inline BYTE hexchar_to_byte(TCHAR ch)
|
static inline BYTE hexchar_to_byte(TCHAR ch)
|
||||||
|
@ -331,7 +333,7 @@ HexEdit_Char (HEXEDIT_INFO *infoPtr, TCHAR ch)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline LRESULT
|
static inline LRESULT
|
||||||
HexEdit_Create (HEXEDIT_INFO *infoPtr, LPCREATESTRUCT lpcs)
|
HexEdit_Create (HEXEDIT_INFO *infoPtr, LPCREATESTRUCTW lpcs)
|
||||||
{
|
{
|
||||||
HexEdit_SetFont(infoPtr, GetStockObject(SYSTEM_FONT), FALSE);
|
HexEdit_SetFont(infoPtr, GetStockObject(SYSTEM_FONT), FALSE);
|
||||||
HexEdit_UpdateScrollbars(infoPtr);
|
HexEdit_UpdateScrollbars(infoPtr);
|
||||||
|
@ -467,15 +469,15 @@ HexEdit_LButtonDown (HEXEDIT_INFO *infoPtr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline LRESULT HexEdit_NCCreate (HWND hwnd, LPCREATESTRUCT lpcs)
|
static inline LRESULT HexEdit_NCCreate (HWND hwnd, LPCREATESTRUCTW lpcs)
|
||||||
{
|
{
|
||||||
HEXEDIT_INFO *infoPtr;
|
HEXEDIT_INFO *infoPtr;
|
||||||
SetWindowLong(hwnd, GWL_EXSTYLE,
|
SetWindowLongW(hwnd, GWL_EXSTYLE,
|
||||||
lpcs->dwExStyle | WS_EX_CLIENTEDGE);
|
lpcs->dwExStyle | WS_EX_CLIENTEDGE);
|
||||||
|
|
||||||
/* allocate memory for info structure */
|
/* allocate memory for info structure */
|
||||||
infoPtr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(HEXEDIT_INFO));
|
infoPtr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(HEXEDIT_INFO));
|
||||||
SetWindowLongPtr(hwnd, 0, (DWORD_PTR)infoPtr);
|
SetWindowLongPtrW(hwnd, 0, (DWORD_PTR)infoPtr);
|
||||||
|
|
||||||
/* initialize info structure */
|
/* initialize info structure */
|
||||||
infoPtr->nCaretPos = 0;
|
infoPtr->nCaretPos = 0;
|
||||||
|
@ -484,7 +486,7 @@ static inline LRESULT HexEdit_NCCreate (HWND hwnd, LPCREATESTRUCT lpcs)
|
||||||
infoPtr->bFocusHex = TRUE;
|
infoPtr->bFocusHex = TRUE;
|
||||||
infoPtr->bInsert = TRUE;
|
infoPtr->bInsert = TRUE;
|
||||||
|
|
||||||
return DefWindowProc(infoPtr->hwndSelf, WM_NCCREATE, 0, (LPARAM)lpcs);
|
return DefWindowProcW(infoPtr->hwndSelf, WM_NCCREATE, 0, (LPARAM)lpcs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline LRESULT
|
static inline LRESULT
|
||||||
|
@ -611,10 +613,10 @@ HexEdit_VScroll (HEXEDIT_INFO *infoPtr, INT action)
|
||||||
static LRESULT WINAPI
|
static LRESULT WINAPI
|
||||||
HexEdit_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
HexEdit_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
HEXEDIT_INFO *infoPtr = (HEXEDIT_INFO *)GetWindowLongPtr (hwnd, 0);
|
HEXEDIT_INFO *infoPtr = (HEXEDIT_INFO *)GetWindowLongPtrW(hwnd, 0);
|
||||||
|
|
||||||
if (!infoPtr && (uMsg != WM_NCCREATE))
|
if (!infoPtr && (uMsg != WM_NCCREATE))
|
||||||
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
||||||
|
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
|
@ -625,10 +627,10 @@ HexEdit_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return HexEdit_GetData (infoPtr, (INT)wParam, (BYTE *)lParam);
|
return HexEdit_GetData (infoPtr, (INT)wParam, (BYTE *)lParam);
|
||||||
|
|
||||||
case WM_CHAR:
|
case WM_CHAR:
|
||||||
return HexEdit_Char (infoPtr, (TCHAR)wParam);
|
return HexEdit_Char (infoPtr, (WCHAR)wParam);
|
||||||
|
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
return HexEdit_Create (infoPtr, (LPCREATESTRUCT)lParam);
|
return HexEdit_Create (infoPtr, (LPCREATESTRUCTW)lParam);
|
||||||
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
return HexEdit_Destroy (infoPtr);
|
return HexEdit_Destroy (infoPtr);
|
||||||
|
@ -652,7 +654,7 @@ HexEdit_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return HexEdit_LButtonDown (infoPtr);
|
return HexEdit_LButtonDown (infoPtr);
|
||||||
|
|
||||||
case WM_NCCREATE:
|
case WM_NCCREATE:
|
||||||
return HexEdit_NCCreate (hwnd, (LPCREATESTRUCT)lParam);
|
return HexEdit_NCCreate (hwnd, (LPCREATESTRUCTW)lParam);
|
||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
HexEdit_Paint(infoPtr);
|
HexEdit_Paint(infoPtr);
|
||||||
|
@ -668,23 +670,23 @@ HexEdit_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return HexEdit_VScroll (infoPtr, (INT)wParam);
|
return HexEdit_VScroll (infoPtr, (INT)wParam);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HexEdit_Register(void)
|
void HexEdit_Register(void)
|
||||||
{
|
{
|
||||||
WNDCLASS wndClass;
|
WNDCLASSW wndClass;
|
||||||
|
|
||||||
ZeroMemory(&wndClass, sizeof(WNDCLASS));
|
ZeroMemory(&wndClass, sizeof(WNDCLASSW));
|
||||||
wndClass.style = 0;
|
wndClass.style = 0;
|
||||||
wndClass.lpfnWndProc = HexEdit_WindowProc;
|
wndClass.lpfnWndProc = HexEdit_WindowProc;
|
||||||
wndClass.cbClsExtra = 0;
|
wndClass.cbClsExtra = 0;
|
||||||
wndClass.cbWndExtra = sizeof(HEXEDIT_INFO *);
|
wndClass.cbWndExtra = sizeof(HEXEDIT_INFO *);
|
||||||
wndClass.hCursor = NULL;
|
wndClass.hCursor = NULL;
|
||||||
wndClass.hbrBackground = NULL;
|
wndClass.hbrBackground = NULL;
|
||||||
wndClass.lpszClassName = HEXEDIT_CLASS;
|
wndClass.lpszClassName = szHexEditClass;
|
||||||
|
|
||||||
RegisterClass(&wndClass);
|
RegisterClassW(&wndClass);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#define WM_NOTIFY_REFLECT (WM_USER+1024)
|
#define WM_NOTIFY_REFLECT (WM_USER+1024)
|
||||||
|
|
||||||
/* HexEdit Class */
|
/* HexEdit Class */
|
||||||
#define HEXEDIT_CLASS TEXT("HexEdit")
|
|
||||||
#define HEM_SETDATA (WM_USER+0)
|
#define HEM_SETDATA (WM_USER+0)
|
||||||
#define HEM_GETDATA (WM_USER+1)
|
#define HEM_GETDATA (WM_USER+1)
|
||||||
|
|
||||||
|
@ -90,6 +89,7 @@ extern enum OPTION_FLAGS Options;
|
||||||
extern WCHAR szTitle[];
|
extern WCHAR szTitle[];
|
||||||
extern const WCHAR szFrameClass[];
|
extern const WCHAR szFrameClass[];
|
||||||
extern const WCHAR szChildClass[];
|
extern const WCHAR szChildClass[];
|
||||||
|
extern const WCHAR szHexEditClass[];
|
||||||
extern WCHAR g_pszDefaultValueName[];
|
extern WCHAR g_pszDefaultValueName[];
|
||||||
|
|
||||||
/* Registry class names and their indexes */
|
/* Registry class names and their indexes */
|
||||||
|
@ -127,7 +127,7 @@ extern BOOL IsDefaultValue(HWND hwndLV, int i);
|
||||||
/* treeview.c */
|
/* treeview.c */
|
||||||
extern HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, UINT id);
|
extern HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, UINT id);
|
||||||
extern BOOL RefreshTreeView(HWND hWndTV);
|
extern BOOL RefreshTreeView(HWND hWndTV);
|
||||||
extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv);
|
extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEWW* pnmtv);
|
||||||
extern LPWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
|
extern LPWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
|
||||||
extern BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem);
|
extern BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem);
|
||||||
extern HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name);
|
extern HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name);
|
||||||
|
|
|
@ -650,7 +650,7 @@ done:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL OnTreeExpanding(HWND hwndTV, NMTREEVIEW* pnmtv)
|
BOOL OnTreeExpanding(HWND hwndTV, NMTREEVIEWW* pnmtv)
|
||||||
{
|
{
|
||||||
return UpdateExpandingTree(hwndTV, pnmtv->itemNew.hItem, pnmtv->itemNew.state);
|
return UpdateExpandingTree(hwndTV, pnmtv->itemNew.hItem, pnmtv->itemNew.state);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue