Commit 50a0c8f7 authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Unicodification. Small cleanups.

parent bfb6d642
......@@ -42,10 +42,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
/* for compiler compatibility we only accept literal ASCII strings */
#undef TEXT
#define TEXT(string) string
#define DRAGLIST_SUBCLASSID 0
#define DRAGLIST_SCROLLPERIOD 200
#define DRAGLIST_TIMERID 666
......@@ -95,7 +91,7 @@ static LRESULT DragList_Notify(HWND hwndLB, UINT uNotification)
}
/* cleans up after dragging */
static inline void DragList_EndDrag(HWND hwnd, DRAGLISTDATA * data)
static void DragList_EndDrag(HWND hwnd, DRAGLISTDATA * data)
{
KillTimer(hwnd, DRAGLIST_TIMERID);
ReleaseCapture();
......@@ -207,12 +203,12 @@ DragList_SubclassWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
*/
BOOL WINAPI MakeDragList (HWND hwndLB)
{
DRAGLISTDATA * data = Alloc(sizeof(DRAGLISTDATA));
DRAGLISTDATA *data = Alloc(sizeof(DRAGLISTDATA));
TRACE("(%p)\n", hwndLB);
if (!uDragListMessage)
uDragListMessage = RegisterWindowMessageA(DRAGLISTMSGSTRING);
uDragListMessage = RegisterWindowMessageW(DRAGLISTMSGSTRINGW);
return SetWindowSubclass(hwndLB, DragList_SubclassWindowProc, DRAGLIST_SUBCLASSID, (DWORD_PTR)data);
}
......@@ -301,14 +297,14 @@ INT WINAPI LBItemFromPt (HWND hwndLB, POINT pt, BOOL bAutoScroll)
ScreenToClient (hwndLB, &pt);
GetClientRect (hwndLB, &rcClient);
nIndex = (INT)SendMessageA (hwndLB, LB_GETTOPINDEX, 0, 0);
nIndex = (INT)SendMessageW (hwndLB, LB_GETTOPINDEX, 0, 0);
if (PtInRect (&rcClient, pt))
{
/* point is inside -- get the item index */
while (TRUE)
{
if (SendMessageA (hwndLB, LB_GETITEMRECT, nIndex, (LPARAM)&rcClient) == LB_ERR)
if (SendMessageW (hwndLB, LB_GETITEMRECT, nIndex, (LPARAM)&rcClient) == LB_ERR)
return -1;
if (PtInRect (&rcClient, pt))
......@@ -338,7 +334,7 @@ INT WINAPI LBItemFromPt (HWND hwndLB, POINT pt, BOOL bAutoScroll)
dwLastScrollTime = dwScrollTime;
SendMessageA (hwndLB, LB_SETTOPINDEX, (WPARAM)nIndex, 0);
SendMessageW (hwndLB, LB_SETTOPINDEX, (WPARAM)nIndex, 0);
}
return -1;
......
......@@ -367,7 +367,17 @@ typedef struct tagDRAGLISTINFO
#define DL_COPYCURSOR 2
#define DL_MOVECURSOR 3
#define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
#define DRAGLISTMSGSTRINGA "commctrl_DragListMsg"
#if defined(__GNUC__)
# define DRAGLISTMSGSTRINGW (const WCHAR []){ 'c','o','m','m','c','t','r','l', \
'_','D','r','a','g','L','i','s','t','M','s','g',0 }
#elif defined(_MSC_VER)
# define DRAGLISTMSGSTRINGW L"commctrl_DragListMsg"
#else
static const WCHAR DRAGLISTMSGSTRINGW[] = { 'c','o','m','m','c','t','r','l', \
'_','D','r','a','g','L','i','s','t','M','s','g',0 };
#endif
#define DRAGLISTMSGSTRING WINELIB_NAME_AW(DRAGLISTMSGSTRING)
BOOL WINAPI MakeDragList (HWND);
VOID WINAPI DrawInsert (HWND, HWND, INT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment