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.