WPCTRMemo.hpp does not compile in C ++

  • Hello,

    On WPTools8, when I include the WPTRMemo.hpp file, I get a compilation error :

    [C ++ Error] WPCTRMemo.hpp (1491, 35): E2040 Declaration terminated incorrectly.

    on the line :

    MESSAGE void __fastcall WM_SETTEXT (Winapi :: Messages :: TMessage & Message);

    This is not surprising since WM_SETTEXT and WM_GETTEXT correspond to Windows constants defined in winuser.h.

    #define WM_SETTEXT                      0x000C
    #define WM_GETTEXT                      0x000D

    These two functions should bear another name. How to get around the problem?

  • In my case the compiler created this code:

    HIDESBASE MESSAGE void __fastcall WMSetFocus(Winapi::Messages::TWMSetFocus &Message);
    HIDESBASE MESSAGE void __fastcall WMKillFocus(Winapi::Messages::TWMKillFocus &Message);
    HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Winapi::Messages::TWMEraseBkgnd &Message);
    HIDESBASE MESSAGE void __fastcall WMPaint(Winapi::Messages::TWMPaint &Message);

  • Hi,

    The compiler is wrong line. These are the two previous lines that pose problems.


    MESSAGE void __fastcall WM_GetTextLength(Winapi::Messages::TWMNoParams &Message);
    MESSAGE void __fastcall WM_SETTEXT(Winapi::Messages::TMessage &Message);
    MESSAGE void __fastcall WM_GETTEXT(Winapi::Messages::TMessage &Message);
    HIDESBASE MESSAGE void __fastcall WMSetFocus(Winapi::Messages::TWMSetFocus &Message);