I need to be able to call the SetClassLongPtr but there is currently no interface for this in the supplied windows modules. I created one myself based upon the definition for SetWindowWord in user32.f90 and it works fine as echoed below.
FUNCTION SetClassLongPtr( hWnd, nIndex, dwNewLong)
integer(LONG_PTR) :: SetClassLongPtr ! LONG_PTR
!DEC$ IF DEFINED(_M_IA64) .OR. DEFINED(_M_AMD64) .OR. DEFINED(__x86_64__)
!DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS:'SetClassLongPtrA' :: SetClassLongPtr
!DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS:'SetClassLongA' :: SetClassLongPtr
integer(HANDLE) hWnd ! HWND hWnd
integer(SINT) nIndex ! int nIndex
integer(LONG_PTR) dwNewLong ! LONG dwNewLong
However in one project I had the somehow set the preprocessor properties option to Yes (/fpp) instead of No and then the compiler started to complain that the preprocssor statement was getting an integer value instead of the expected charactor type. Is this expected behavior as the documentation is not very explicit?
Feature request: Could SetWindowLongPtr interface be added to the official user32.f90?