Unicodification. Small cleanups.

This commit is contained in:
Dimitrie O. Paun 2005-03-03 13:51:47 +00:00 committed by Alexandre Julliard
parent bfb6d642dd
commit 50a0c8f734
2 changed files with 17 additions and 11 deletions

View File

@ -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;

View File

@ -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);