From defcfc85db22896794484d5693b3b96740af3e1b Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Thu, 16 Sep 2004 19:06:12 +0000 Subject: [PATCH] Use Unicode window messages. --- dlls/comctl32/toolbar.c | 160 ++++++++++++++++++++-------------------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index a2781eb199..7467674a3e 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -1570,14 +1570,14 @@ TOOLBAR_CalcToolbar (HWND hwnd) /* Set the toolTip only for non-hidden, non-separator button */ if (infoPtr->hwndToolTip && !(btnPtr->fsStyle & BTNS_SEP )) { - TTTOOLINFOA ti; + TTTOOLINFOW ti; - ZeroMemory (&ti, sizeof(TTTOOLINFOA)); - ti.cbSize = sizeof(TTTOOLINFOA); + ZeroMemory (&ti, sizeof(ti)); + ti.cbSize = sizeof(ti); ti.hwnd = hwnd; ti.uId = btnPtr->idCommand; ti.rect = btnPtr->rect; - SendMessageA (infoPtr->hwndToolTip, TTM_NEWTOOLRECTA, + SendMessageW (infoPtr->hwndToolTip, TTM_NEWTOOLRECTW, 0, (LPARAM)&ti); } @@ -1760,7 +1760,7 @@ TOOLBAR_RelayEvent (HWND hwndTip, HWND hwndMsg, UINT uMsg, msg.pt.x = LOWORD(GetMessagePos ()); msg.pt.y = HIWORD(GetMessagePos ()); - SendMessageA (hwndTip, TTM_RELAYEVENT, 0, (LPARAM)&msg); + SendMessageW (hwndTip, TTM_RELAYEVENT, 0, (LPARAM)&msg); } /* keeps available button list box sorted by button id */ @@ -1773,27 +1773,27 @@ static void TOOLBAR_Cust_InsertAvailButton(HWND hwnd, PCUSTOMBUTTON btnInfoNew) ERR("button %s, idCommand %d\n", debugstr_w(btnInfoNew->text), btnInfoNew->btn.idCommand); - count = SendMessageA(hwndAvail, LB_GETCOUNT, 0, 0); + count = SendMessageW(hwndAvail, LB_GETCOUNT, 0, 0); /* position 0 is always separator */ for (i = 1; i < count; i++) { - btnInfo = (PCUSTOMBUTTON)SendMessageA(hwndAvail, LB_GETITEMDATA, i, 0); + btnInfo = (PCUSTOMBUTTON)SendMessageW(hwndAvail, LB_GETITEMDATA, i, 0); if (btnInfoNew->btn.idCommand < btnInfo->btn.idCommand) { - i = SendMessageA(hwndAvail, LB_INSERTSTRING, i, 0); - SendMessageA(hwndAvail, LB_SETITEMDATA, i, (LPARAM)btnInfoNew); + i = SendMessageW(hwndAvail, LB_INSERTSTRING, i, 0); + SendMessageW(hwndAvail, LB_SETITEMDATA, i, (LPARAM)btnInfoNew); return; } } /* id higher than all others add to end */ - i = SendMessageA(hwndAvail, LB_ADDSTRING, 0, 0); - SendMessageA(hwndAvail, LB_SETITEMDATA, i, (LPARAM)btnInfoNew); + i = SendMessageW(hwndAvail, LB_ADDSTRING, 0, 0); + SendMessageW(hwndAvail, LB_SETITEMDATA, i, (LPARAM)btnInfoNew); } static void TOOLBAR_Cust_MoveButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nIndexFrom, INT nIndexTo) { - NMTOOLBARA nmtb; + NMTOOLBARW nmtb; TRACE("index from %d, index to %d\n", nIndexFrom, nIndexTo); @@ -1807,14 +1807,14 @@ static void TOOLBAR_Cust_MoveButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nInde PCUSTOMBUTTON btnInfo; NMHDR hdr; HWND hwndList = GetDlgItem(hwnd, IDC_TOOLBARBTN_LBOX); - int count = SendMessageA(hwndList, LB_GETCOUNT, 0, 0); + int count = SendMessageW(hwndList, LB_GETCOUNT, 0, 0); - btnInfo = (PCUSTOMBUTTON)SendMessageA(hwndList, LB_GETITEMDATA, nIndexFrom, 0); + btnInfo = (PCUSTOMBUTTON)SendMessageW(hwndList, LB_GETITEMDATA, nIndexFrom, 0); - SendMessageA(hwndList, LB_DELETESTRING, nIndexFrom, 0); - SendMessageA(hwndList, LB_INSERTSTRING, nIndexTo, 0); - SendMessageA(hwndList, LB_SETITEMDATA, nIndexTo, (LPARAM)btnInfo); - SendMessageA(hwndList, LB_SETCURSEL, nIndexTo, 0); + SendMessageW(hwndList, LB_DELETESTRING, nIndexFrom, 0); + SendMessageW(hwndList, LB_INSERTSTRING, nIndexTo, 0); + SendMessageW(hwndList, LB_SETITEMDATA, nIndexTo, (LPARAM)btnInfo); + SendMessageW(hwndList, LB_SETCURSEL, nIndexTo, 0); if (nIndexTo <= 0) EnableWindow(GetDlgItem(hwnd,IDC_MOVEUP_BTN), FALSE); @@ -1827,8 +1827,8 @@ static void TOOLBAR_Cust_MoveButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nInde else EnableWindow(GetDlgItem(hwnd,IDC_MOVEDN_BTN), TRUE); - SendMessageA(custInfo->tbHwnd, TB_DELETEBUTTON, nIndexFrom, 0); - SendMessageA(custInfo->tbHwnd, TB_INSERTBUTTONA, nIndexTo, (LPARAM)&(btnInfo->btn)); + SendMessageW(custInfo->tbHwnd, TB_DELETEBUTTON, nIndexFrom, 0); + SendMessageW(custInfo->tbHwnd, TB_INSERTBUTTONA, nIndexTo, (LPARAM)&(btnInfo->btn)); TOOLBAR_SendNotify(&hdr, custInfo->tbInfo, TBN_TOOLBARCHANGE); } @@ -1836,7 +1836,7 @@ static void TOOLBAR_Cust_MoveButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nInde static void TOOLBAR_Cust_AddButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nIndexAvail, INT nIndexTo) { - NMTOOLBARA nmtb; + NMTOOLBARW nmtb; TRACE("Add: nIndexAvail %d, nIndexTo %d\n", nIndexAvail, nIndexTo); @@ -1848,18 +1848,18 @@ static void TOOLBAR_Cust_AddButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nIndex NMHDR hdr; HWND hwndList = GetDlgItem(hwnd, IDC_TOOLBARBTN_LBOX); HWND hwndAvail = GetDlgItem(hwnd, IDC_AVAILBTN_LBOX); - int count = SendMessageA(hwndAvail, LB_GETCOUNT, 0, 0); + int count = SendMessageW(hwndAvail, LB_GETCOUNT, 0, 0); - btnInfo = (PCUSTOMBUTTON)SendMessageA(hwndAvail, LB_GETITEMDATA, nIndexAvail, 0); + btnInfo = (PCUSTOMBUTTON)SendMessageW(hwndAvail, LB_GETITEMDATA, nIndexAvail, 0); if (nIndexAvail != 0) /* index == 0 indicates separator */ { /* remove from 'available buttons' list */ - SendMessageA(hwndAvail, LB_DELETESTRING, nIndexAvail, 0); + SendMessageW(hwndAvail, LB_DELETESTRING, nIndexAvail, 0); if (nIndexAvail == count-1) - SendMessageA(hwndAvail, LB_SETCURSEL, nIndexAvail-1 , 0); + SendMessageW(hwndAvail, LB_SETCURSEL, nIndexAvail-1 , 0); else - SendMessageA(hwndAvail, LB_SETCURSEL, nIndexAvail , 0); + SendMessageW(hwndAvail, LB_SETCURSEL, nIndexAvail , 0); } else { @@ -1872,10 +1872,10 @@ static void TOOLBAR_Cust_AddButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT nIndex } /* insert into 'toolbar button' list */ - SendMessageA(hwndList, LB_INSERTSTRING, nIndexTo, 0); - SendMessageA(hwndList, LB_SETITEMDATA, nIndexTo, (LPARAM)btnInfo); + SendMessageW(hwndList, LB_INSERTSTRING, nIndexTo, 0); + SendMessageW(hwndList, LB_SETITEMDATA, nIndexTo, (LPARAM)btnInfo); - SendMessageA(custInfo->tbHwnd, TB_INSERTBUTTONA, nIndexTo, (LPARAM)&(btnInfo->btn)); + SendMessageW(custInfo->tbHwnd, TB_INSERTBUTTONW, nIndexTo, (LPARAM)&(btnInfo->btn)); TOOLBAR_SendNotify(&hdr, custInfo->tbInfo, TBN_TOOLBARCHANGE); } @@ -1888,17 +1888,17 @@ static void TOOLBAR_Cust_RemoveButton(PCUSTDLG_INFO custInfo, HWND hwnd, INT ind TRACE("Remove: index %d\n", index); - btnInfo = (PCUSTOMBUTTON)SendMessageA(hwndList, LB_GETITEMDATA, index, 0); + btnInfo = (PCUSTOMBUTTON)SendMessageW(hwndList, LB_GETITEMDATA, index, 0); /* send TBN_QUERYDELETE notification */ if (TOOLBAR_IsButtonRemovable(custInfo->tbInfo, index, btnInfo)) { NMHDR hdr; - SendMessageA(hwndList, LB_DELETESTRING, index, 0); - SendMessageA(hwndList, LB_SETCURSEL, index , 0); + SendMessageW(hwndList, LB_DELETESTRING, index, 0); + SendMessageW(hwndList, LB_SETCURSEL, index , 0); - SendMessageA(custInfo->tbHwnd, TB_DELETEBUTTON, index, 0); + SendMessageW(custInfo->tbHwnd, TB_DELETEBUTTON, index, 0); /* insert into 'available button' list */ if (!(btnInfo->btn.fsStyle & BTNS_SEP)) @@ -1919,7 +1919,7 @@ static LRESULT TOOLBAR_Cust_ToolbarDragListNotification(PCUSTDLG_INFO custInfo, case DL_BEGINDRAG: { INT nCurrentItem = LBItemFromPt(hwndList, pDLI->ptCursor, TRUE); - INT nCount = SendMessageA(hwndList, LB_GETCOUNT, 0, 0); + INT nCount = SendMessageW(hwndList, LB_GETCOUNT, 0, 0); /* no dragging for last item (separator) */ if (nCurrentItem >= (nCount - 1)) return FALSE; return TRUE; @@ -1927,7 +1927,7 @@ static LRESULT TOOLBAR_Cust_ToolbarDragListNotification(PCUSTDLG_INFO custInfo, case DL_DRAGGING: { INT nCurrentItem = LBItemFromPt(hwndList, pDLI->ptCursor, TRUE); - INT nCount = SendMessageA(hwndList, LB_GETCOUNT, 0, 0); + INT nCount = SendMessageW(hwndList, LB_GETCOUNT, 0, 0); /* no dragging past last item (separator) */ if ((nCurrentItem >= 0) && (nCurrentItem < (nCount - 1))) { @@ -1954,8 +1954,8 @@ static LRESULT TOOLBAR_Cust_ToolbarDragListNotification(PCUSTDLG_INFO custInfo, case DL_DROPPED: { INT nIndexTo = LBItemFromPt(hwndList, pDLI->ptCursor, TRUE); - INT nIndexFrom = SendMessageA(hwndList, LB_GETCURSEL, 0, 0); - INT nCount = SendMessageA(hwndList, LB_GETCOUNT, 0, 0); + INT nIndexFrom = SendMessageW(hwndList, LB_GETCURSEL, 0, 0); + INT nCount = SendMessageW(hwndList, LB_GETCOUNT, 0, 0); if ((nIndexTo >= 0) && (nIndexTo < (nCount - 1))) { /* clear drag arrow */ @@ -1993,7 +1993,7 @@ static LRESULT TOOLBAR_Cust_AvailDragListNotification(PCUSTDLG_INFO custInfo, HW case DL_BEGINDRAG: { INT nCurrentItem = LBItemFromPt(hwndList, pDLI->ptCursor, TRUE); - INT nCount = SendMessageA(hwndList, LB_GETCOUNT, 0, 0); + INT nCount = SendMessageW(hwndList, LB_GETCOUNT, 0, 0); /* no dragging for last item (separator) */ if (nCurrentItem >= (nCount - 1)) return FALSE; return TRUE; @@ -2001,7 +2001,7 @@ static LRESULT TOOLBAR_Cust_AvailDragListNotification(PCUSTDLG_INFO custInfo, HW case DL_DRAGGING: { INT nCurrentItem = LBItemFromPt(hwndList, pDLI->ptCursor, TRUE); - INT nCount = SendMessageA(hwndList, LB_GETCOUNT, 0, 0); + INT nCount = SendMessageW(hwndList, LB_GETCOUNT, 0, 0); /* no dragging past last item (separator) */ if ((nCurrentItem >= 0) && (nCurrentItem < (nCount - 1))) { @@ -2028,8 +2028,8 @@ static LRESULT TOOLBAR_Cust_AvailDragListNotification(PCUSTDLG_INFO custInfo, HW case DL_DROPPED: { INT nIndexTo = LBItemFromPt(hwndList, pDLI->ptCursor, TRUE); - INT nCount = SendMessageA(hwndList, LB_GETCOUNT, 0, 0); - INT nIndexFrom = SendDlgItemMessageA(hwnd, IDC_AVAILBTN_LBOX, LB_GETCURSEL, 0, 0); + INT nCount = SendMessageW(hwndList, LB_GETCOUNT, 0, 0); + INT nIndexFrom = SendDlgItemMessageW(hwnd, IDC_AVAILBTN_LBOX, LB_GETCURSEL, 0, 0); if ((nIndexTo >= 0) && (nIndexTo < (nCount - 1))) { /* clear drag arrow */ @@ -2194,7 +2194,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) MakeDragList(GetDlgItem(hwnd, IDC_AVAILBTN_LBOX)); /* set focus and disable buttons */ - PostMessageA (hwnd, WM_USER, 0, 0); + PostMessageW (hwnd, WM_USER, 0, 0); } return TRUE; @@ -2476,17 +2476,17 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam) /* FIXME: on windows the size of the images is 25x24 but the size of the bitmap * in rsrc is only 24x24. Fix the bitmap (how?) and then fix this */ - SendMessageA (hwnd, TB_SETBITMAPSIZE, 0, + SendMessageW (hwnd, TB_SETBITMAPSIZE, 0, MAKELPARAM((WORD)24, (WORD)24)); - SendMessageA (hwnd, TB_SETBUTTONSIZE, 0, + SendMessageW (hwnd, TB_SETBUTTONSIZE, 0, MAKELPARAM((WORD)31, (WORD)30)); } else { /* small icons */ - SendMessageA (hwnd, TB_SETBITMAPSIZE, 0, + SendMessageW (hwnd, TB_SETBITMAPSIZE, 0, MAKELPARAM((WORD)16, (WORD)16)); - SendMessageA (hwnd, TB_SETBUTTONSIZE, 0, + SendMessageW (hwnd, TB_SETBUTTONSIZE, 0, MAKELPARAM((WORD)22, (WORD)22)); } @@ -2704,16 +2704,16 @@ TOOLBAR_AddButtonsA (HWND hwnd, WPARAM wParam, LPARAM lParam) btnPtr->bHot = FALSE; if ((infoPtr->hwndToolTip) && !(btnPtr->fsStyle & BTNS_SEP)) { - TTTOOLINFOA ti; + TTTOOLINFOW ti; - ZeroMemory (&ti, sizeof(TTTOOLINFOA)); - ti.cbSize = sizeof (TTTOOLINFOA); + ZeroMemory (&ti, sizeof(ti)); + ti.cbSize = sizeof(ti); ti.hwnd = hwnd; ti.uId = btnPtr->idCommand; ti.hinst = 0; - ti.lpszText = LPSTR_TEXTCALLBACKA; + ti.lpszText = LPSTR_TEXTCALLBACKW; - SendMessageA (infoPtr->hwndToolTip, TTM_ADDTOOLA, + SendMessageW (infoPtr->hwndToolTip, TTM_ADDTOOLW, 0, (LPARAM)&ti); } } @@ -3206,14 +3206,14 @@ TOOLBAR_DeleteButton (HWND hwnd, WPARAM wParam, LPARAM lParam) if ((infoPtr->hwndToolTip) && !(infoPtr->buttons[nIndex].fsStyle & BTNS_SEP)) { - TTTOOLINFOA ti; + TTTOOLINFOW ti; - ZeroMemory (&ti, sizeof(TTTOOLINFOA)); - ti.cbSize = sizeof (TTTOOLINFOA); + ZeroMemory (&ti, sizeof(ti)); + ti.cbSize = sizeof(ti); ti.hwnd = hwnd; ti.uId = infoPtr->buttons[nIndex].idCommand; - SendMessageA (infoPtr->hwndToolTip, TTM_DELTOOLA, 0, (LPARAM)&ti); + SendMessageW (infoPtr->hwndToolTip, TTM_DELTOOLW, 0, (LPARAM)&ti); } if (infoPtr->nNumButtons == 1) { @@ -3879,16 +3879,16 @@ TOOLBAR_InsertButtonA (HWND hwnd, WPARAM wParam, LPARAM lParam) infoPtr->buttons[nIndex].iString = lpTbb->iString; if ((infoPtr->hwndToolTip) && !(lpTbb->fsStyle & BTNS_SEP)) { - TTTOOLINFOA ti; + TTTOOLINFOW ti; - ZeroMemory (&ti, sizeof(TTTOOLINFOA)); - ti.cbSize = sizeof (TTTOOLINFOA); + ZeroMemory (&ti, sizeof(ti)); + ti.cbSize = sizeof (ti); ti.hwnd = hwnd; ti.uId = lpTbb->idCommand; ti.hinst = 0; - ti.lpszText = LPSTR_TEXTCALLBACKA; + ti.lpszText = LPSTR_TEXTCALLBACKW; - SendMessageA (infoPtr->hwndToolTip, TTM_ADDTOOLA, + SendMessageW (infoPtr->hwndToolTip, TTM_ADDTOOLW, 0, (LPARAM)&ti); } @@ -5508,11 +5508,11 @@ TOOLBAR_EraseBackground (HWND hwnd, WPARAM wParam, LPARAM lParam) parent = GetParent(hwnd); MapWindowPoints(hwnd, parent, &pt, 1); OffsetWindowOrgEx (hdc, pt.x, pt.y, &ptorig); - ret = SendMessageA (parent, WM_ERASEBKGND, wParam, lParam); + ret = SendMessageW (parent, WM_ERASEBKGND, wParam, lParam); SetWindowOrgEx (hdc, ptorig.x, ptorig.y, 0); } if (!ret) - ret = DefWindowProcA (hwnd, WM_ERASEBKGND, wParam, lParam); + ret = DefWindowProcW (hwnd, WM_ERASEBKGND, wParam, lParam); if ((infoPtr->dwStyle & TBSTYLE_CUSTOMERASE) && (infoPtr->dwBaseCustDraw & CDRF_NOTIFYPOSTERASE)) { @@ -5857,7 +5857,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam) if (btnPtr->fsState & TBSTATE_ENABLED) { - SendMessageA (infoPtr->hwndNotify, WM_COMMAND, + SendMessageW (infoPtr->hwndNotify, WM_COMMAND, MAKEWPARAM(infoPtr->buttons[nHit].idCommand, 0), (LPARAM)hwnd); } } @@ -6064,7 +6064,7 @@ inline static LRESULT TOOLBAR_NCActivate (HWND hwnd, WPARAM wParam, LPARAM lParam) { /* if (wndPtr->dwStyle & CCS_NODIVIDER) */ - return DefWindowProcA (hwnd, WM_NCACTIVATE, wParam, lParam); + return DefWindowProcW (hwnd, WM_NCACTIVATE, wParam, lParam); /* else */ /* return TOOLBAR_NCPaint (wndPtr, wParam, lParam); */ } @@ -6076,7 +6076,7 @@ TOOLBAR_NCCalcSize (HWND hwnd, WPARAM wParam, LPARAM lParam) if (!(GetWindowLongW(hwnd, GWL_STYLE) & CCS_NODIVIDER)) ((LPRECT)lParam)->top += GetSystemMetrics(SM_CYEDGE); - return DefWindowProcA (hwnd, WM_NCCALCSIZE, wParam, lParam); + return DefWindowProcW (hwnd, WM_NCCALCSIZE, wParam, lParam); } @@ -6153,7 +6153,7 @@ TOOLBAR_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam) SetWindowLongW (hwnd, GWL_STYLE, cs->style | styleadd); } - return DefWindowProcA (hwnd, WM_NCCREATE, wParam, lParam); + return DefWindowProcW (hwnd, WM_NCCREATE, wParam, lParam); } @@ -6167,7 +6167,7 @@ TOOLBAR_NCPaint (HWND hwnd, WPARAM wParam, LPARAM lParam) if (dwStyle & WS_MINIMIZE) return 0; /* Nothing to do */ - DefWindowProcA (hwnd, WM_NCPAINT, wParam, lParam); + DefWindowProcW (hwnd, WM_NCPAINT, wParam, lParam); if (!(hdc = GetDCEx (hwnd, 0, DCX_USESTYLE | DCX_WINDOW))) return 0; @@ -6389,7 +6389,7 @@ TOOLBAR_NotifyFormat(TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam) return NFR_UNICODE; if (lParam == NF_REQUERY) { - i = SendMessageA(infoPtr->hwndNotify, + i = SendMessageW(infoPtr->hwndNotify, WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY); if ((i < NFR_ANSI) || (i > NFR_UNICODE)) { ERR("wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI\n", @@ -6638,7 +6638,7 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) hwnd, uMsg, /* SPY_GetMsgName(uMsg), */ wParam, lParam); if (!TOOLBAR_GetInfoPtr(hwnd) && (uMsg != WM_NCCREATE)) - return DefWindowProcA( hwnd, uMsg, wParam, lParam ); + return DefWindowProcW( hwnd, uMsg, wParam, lParam ); switch (uMsg) { @@ -7018,17 +7018,17 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_DRAWITEM: case WM_MEASUREITEM: case WM_VKEYTOITEM: - return SendMessageA (infoPtr->hwndNotify, uMsg, wParam, lParam); + return SendMessageW (infoPtr->hwndNotify, uMsg, wParam, lParam); /* We see this in Outlook Express 5.x and just does DefWindowProc */ case PGM_FORWARDMOUSE: - return DefWindowProcA (hwnd, uMsg, wParam, lParam); + return DefWindowProcW (hwnd, uMsg, wParam, lParam); default: if ((uMsg >= WM_USER) && (uMsg < WM_APP)) ERR("unknown msg %04x wp=%08x lp=%08lx\n", uMsg, wParam, lParam); - return DefWindowProcA (hwnd, uMsg, wParam, lParam); + return DefWindowProcW (hwnd, uMsg, wParam, lParam); } return 0; } @@ -7037,25 +7037,25 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) VOID TOOLBAR_Register (void) { - WNDCLASSA wndClass; + WNDCLASSW wndClass; - ZeroMemory (&wndClass, sizeof(WNDCLASSA)); + ZeroMemory (&wndClass, sizeof(WNDCLASSW)); wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS; - wndClass.lpfnWndProc = (WNDPROC)ToolbarWindowProc; + wndClass.lpfnWndProc = ToolbarWindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = sizeof(TOOLBAR_INFO *); - wndClass.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); - wndClass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); - wndClass.lpszClassName = TOOLBARCLASSNAMEA; + wndClass.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW); + wndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); + wndClass.lpszClassName = TOOLBARCLASSNAMEW; - RegisterClassA (&wndClass); + RegisterClassW (&wndClass); } VOID TOOLBAR_Unregister (void) { - UnregisterClassA (TOOLBARCLASSNAMEA, NULL); + UnregisterClassW (TOOLBARCLASSNAMEW, NULL); } static HIMAGELIST TOOLBAR_InsertImageList(PIMLENTRY **pies, INT *cies, HIMAGELIST himl, INT id)