- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
iret = SetClassLong(ghWndView,GCL_HCURSOR,LoadCursor(NULL,IDC_CROSS))
- Balises:
- Intel® Fortran Compiler
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
iret = SetClassLong(ghWndView,GCL_HCURSOR,LoadCursor(NULL,IDC_CROSS))
Why not use SetCursor, sure looks simpler (I have no idea if this fails in x64):
rval = SetCursor (LoadCursor(NULL, IDC_ARROW))
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi Steve, Here is an example of the warning, this time for the background brush for the window. I get similar warnings for loading the cursor. I think the final argument in SetClassLong is 32-bit but in 64-bit OS functions like LoadCursor and GetStockObject will return a 64 bit value. I could cast the function using int(function,DWORD) but I don't think it will return the correct value always.
iret
= SelectObject(hBkDC,GetStockObject(DC_BRUSH))
icolref
= SetDCBrushColor(hBkDC,RGB(int1(255*gp%BkRGB(1)),int1(255*gp%BkRGB(2)),int1(255*gp%RGB(3))))
iret
= SetClassLong(ghWndView,GCL_HBRBACKGROUND,GetStockObject(DC_BRUSH))
C:WinFEM2000menuupdate.f90(716): warning #6075: The data type of the actual argument does not match the definition. [GETSTOCKOBJECT]
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Steve, I've already tried this (see initial post)but the function could not be resolved by the linker. Where is it defined?
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
[plain]FUNCTION SetClassLongPtr_( &
hWnd, &
nIndex, &
dwNewLong)
use ifwinty
integer(ULONG_PTR) :: SetClassLongPtr_
!DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS:'SetClassLongPtrA' :: SetClassLongPtr_
integer(HANDLE) hWnd ! HWND hWnd
integer(SINT) nIndex ! int nIndex
integer(LONG_PTR) dwNewLong ! LONG dwNewLong
END FUNCTION
END INTERFACE[/plain]
Note that I added an underscore at the end so as to not conflict with the real definition when it appears- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
[plain]FUNCTION SetClassLongPtr_( &
hWnd, &
nIndex, &
dwNewLong)
use ifwinty
integer(ULONG_PTR) :: SetClassLongPtr_
!DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS:'SetClassLongPtrA' :: SetClassLongPtr_
integer(HANDLE) hWnd ! HWND hWnd
integer(SINT) nIndex ! int nIndex
integer(LONG_PTR) dwNewLong ! LONG dwNewLong
END FUNCTION
END INTERFACE[/plain]
Note that I added an underscore at the end so as to not conflict with the real definition when it appearsThanks Steve, it builds and links ok now but I can't test it until Monday. When will 11.1 be released?
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable