Конференция "KOL" » Incompatible Types TMsg and tagMSG [Delphi, Windows]
 
  • Dodfr (09.11.11 21:57) [0]
    Hi,

    I am trying to update KOL&MCK from an old 2.x to the last 3.15 but I have some problems with the new TMsg introduced in 3.04

    If I try to compile many of MH components like KOLMHFontDialog or KOLMHUpDown (and others)

    I get this thread's subject error, any idea how to fix it ?

    for example this line produce the error :

     Result.AttachProc(WndProcUpDown);

    and WndProcUpDown is declared as :

    function WndProcUpDown(Sender: PControl; var Msg: TMsg; var Rslt: Integer):boolean;

    regards.
  • Dodfr (10.11.11 13:46) [1]
    I think I found an answer myself, it seems that for unknown reason, TMsg is searched inside windows.pas first and not inside KOL.pas so I changed "var Msg: TMsg" into "var Msg: KOL.Tmsg".
  • RusSun © (10.11.11 21:34) [2]
    Vladimir Kladov ©   (31.12.10 12:11)  

    С наступающим Новым Годом!

    Новости от 31 декабря 2010 (KOL & MCK v3.04)

    Обратите внимание, что в данной версии изменилась декларация структуры TMsg. Из-за этого компилятор может отказываться воспринимать ранее назначенные обработчики события OnMessage. Для исправления ситуации достаточно заменить ссылки на тип tagMsg типом TMsg. Для проектов MCK такое исправление будет выполнено автоматически при загрузке (не забудьте сначала сделать ребилд пакета MCK !).

    http://pda.delphimaster.net/?id=1293786711&n=10
  • Dodfr (11.11.11 18:08) [3]
    Sorry I can't read russian but google translate is my best friend ;-)

    I already read the 3.04 info about it and WndProcUpDown was already defined with  a TMsg, but delphi compiler used windows.pas TMsg definition instead of the TMsg inside kol.pas so the trick I used is to force delphi to use the correct TMsg from kol.pas using KOL.TMsg.
 
Конференция "KOL" » Incompatible Types TMsg and tagMSG [Delphi, Windows]
Есть новые Нет новых   [119256   +38][b:0][p:0]