Ver Mensaje Individual
  #1  
Antiguo 05-10-2007
Avatar de gluglu
[gluglu] gluglu is offline
Miembro Premium
 
Registrado: sep 2004
Ubicación: Málaga - España
Posts: 1.455
Reputación: 21
gluglu Va por buen camino
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.
__________________
Piensa siempre en positivo !
Responder Con Cita