rossryan
asked on
c# translation 4
What is the c# translation of this code?:
HDC WINAPI CPaintHook::MyBeginPaint(H WND hWnd, LPPAINTSTRUCT lpPaint)
{
const CPaintHook * pThis = (CPaintHook *) GetWindowLong(hWnd, GWL_WNDPROC);
pThis = (const CPaintHook *) ( (unsigned) pThis - (unsigned) & pThis->m_thunk[0] + (unsigned) pThis );
if ( pThis->Within_WM_PRINT() )
{
memset(lpPaint, 0, sizeof(PAINTSTRUCT));
lpPaint->hdc = pThis->m_hDC;
GetClientRect(hWnd, & lpPaint->rcPaint);
return pThis->m_hDC;
}
else
{
__asm mov eax, syscall_BeginPaint
__asm push lpPaint
__asm push hWnd
__asm call pBeginPaint
}
}
HDC WINAPI CPaintHook::MyBeginPaint(H
{
const CPaintHook * pThis = (CPaintHook *) GetWindowLong(hWnd, GWL_WNDPROC);
pThis = (const CPaintHook *) ( (unsigned) pThis - (unsigned) & pThis->m_thunk[0] + (unsigned) pThis );
if ( pThis->Within_WM_PRINT() )
{
memset(lpPaint, 0, sizeof(PAINTSTRUCT));
lpPaint->hdc = pThis->m_hDC;
GetClientRect(hWnd, & lpPaint->rcPaint);
return pThis->m_hDC;
}
else
{
__asm mov eax, syscall_BeginPaint
__asm push lpPaint
__asm push hWnd
__asm call pBeginPaint
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.