Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   Modificación a UIApp de Roman (https://www.clubdelphi.com/foros/showthread.php?t=48854)

gluglu 05-10-2007 18:02:28

Modificación a UIApp de Roman
 
Hola !

Buscando en el foro he topado con la Unit UIApp de Roman.

Al utilizar BDS 2006 con VCL.Net me dá un error de compilacion 'Invalid TypeCast' en la siguiente línea

Código Delphi [-]
SetWindowLong(Application.Handle, GWL_WNDPROC, LongWord(@AppWndProc));

Además no me permite declarar esto :
Código Delphi [-]
function AppWndProc(Handle: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LongInt; stdcall;
de la forma expuesta. Me dá error 'Procedure definition must be ILCODE calling convention'. Quitando 'stdcall' me compila correctamente.

Lo que intengo declarar es una Variable AuxLong tipo LongWord y sustituir @AppWndProc por el valor de AuxLong.

Para ello pretendía llamar antes de la instrucción SetWindowLong a :
Código Delphi [-]
AuxLong := AppWndProc(??, ??, ??. ??);
pero no sé qué parametros pasarle como Handle, Msd, wParam, lParam.

Por otro lado he visto en la propia ayuda de Delphi que la función SetWindowLong indica :
Cita:

Note This function has been superseded by the SetWindowLongPtr function. To write code that is compatible with both 32-bit and 64-bit versions of Microsoft® Windows®, use the SetWindowLongPtr function.
No sé si sería mejor sustituirla por SetWindowLongPtr ? Entiendo que los parámetros son los mismos y que la llamada es igual.

Muchas gracias por vuestra ayuda. ;)


La franja horaria es GMT +2. Ahora son las 20:25:19.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi