1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| //Wrapper de SetWindowLongPtr
inline LONG_PTR MySetWindowLongPtr(HWND hWnd, int nIndex, LONG_PTR lpNew)
{
#ifdef WIN64
return ::SetWindowLongPtr(hWnd, nIndex, lpNew);
#else
return static_cast< LONG_PTR >(
::SetWindowLongPtr(hWnd, nIndex, static_cast< LONG >(lpNew))
);
#endif
}
//wrapper de GetWindowLongPtr
inline LONG_PTR MyGetWindowLongPtr(HWND hWnd, int nIndex)
{
#ifdef WIN64
return ::GetWindowLongPtr(hWnd, nIndex);
#else
return static_cast< LONG_PTR >(::GetWindowLongPtr(hWnd, nIndex));
#endif
}
//Wrapper de SetClassLongPtr
inline LONG_PTR MySetClassLongPtr(HWND hWnd, int nIndex, LONG_PTR lpNew)
{
#ifdef WIN64
return ::SetClassLongPtr(hWnd, nIndex, lpNew);
#else
return static_cast< LONG_PTR >(
::SetClassLongPtr(hWnd, nIndex, static_cast< LONG >(lpNew))
);
#endif
}
//wrapper de GetClassLongPtr
inline LONG_PTR MyGetClassLongPtr(HWND hWnd, int nIndex)
{
#ifdef WIN64
return ::GetClassLongPtr(hWnd, nIndex);
#else
return static_cast< LONG_PTR >(::GetClassLongPtr(hWnd, nIndex));
#endif
} |
Partager