Commit eaa28e5f authored by Gerard Patel's avatar Gerard Patel Committed by Alexandre Julliard

Handle the LB_GETTEXT and CB_GETLBTEXT cases for 32W to 16 mapping.

parent 7d0968e0
......@@ -2207,7 +2207,18 @@ INT WINPROC_MapMsg32WTo16( HWND hwnd, UINT msg32, WPARAM wParam32,
*plparam = (LPARAM)SEGPTR_GET(str);
}
return 1;
default: /* No Unicode translation needed */
case LB_GETTEXT:
case CB_GETLBTEXT:
if ( WINPROC_TestLBForStr( hwnd ))
{
LPSTR str = (LPSTR) SEGPTR_ALLOC( 256 ); /* fixme: fixed sized buffer */
if (!str) return -1;
*pmsg16 = (msg32 == LB_GETTEXT)? LB_GETTEXT16 : CB_GETLBTEXT16;
*pwparam16 = (WPARAM16)LOWORD(wParam32);
*plparam = (LPARAM)SEGPTR_GET(str);
}
return 1;
default: /* No Unicode translation needed (?) */
return WINPROC_MapMsg32ATo16( hwnd, msg32, wParam32, pmsg16,
pwparam16, plparam );
}
......@@ -2232,6 +2243,15 @@ void WINPROC_UnmapMsg32WTo16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
SEGPTR_FREE( (LPARAM *)str - 1 );
}
break;
case LB_GETTEXT:
case CB_GETLBTEXT:
if ( WINPROC_TestLBForStr( hwnd ))
{
LPSTR str = (LPSTR)PTR_SEG_TO_LIN(p16->lParam);
lstrcpyAtoW( (LPWSTR)lParam, str );
SEGPTR_FREE( (LPARAM *) str );
}
break;
default:
WINPROC_UnmapMsg32ATo16( hwnd, msg, wParam, lParam, p16 );
break;
......
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