sendmessage function

John C johnch_atms at hotmail.com
Sun Mar 5 06:40:37 PST 2006


"llee" <llee_member at pathlink.com> wrote in message 
news:dues9i$1v6$1 at digitaldaemon.com...
> I'm trying to call the SendMessage function as defined in the windows api.
> Unfortunately every attempt to call it results in an error.
> Initially I tried calling the function directly assuming that it would 
> have been
> imported into my applications namespace after:
> " import std.c.windows.windows; "

It's defined as SendMessageA.

> this failed. So I tried:
> " extern (Windows) void SendMessage (HWND, uint, WPARAM, LPARAM); "

That should be
    extern(Windows) LPARAM SendMessageA(HWND, UINT, WPARAM, LPARAM);
or
    extern(Windows) LPARAM SendMessageW(HWND, UINT, WPARAM, LPARAM);
to use the Unicode version.

> this got the problem past the compiler, but generated an error during 
> linkage.
> At this stage I'm open for alternatives.
> I'm trying to update a client window after my program processes WM_CHAR
> messages. I was trying to use the SendMessage function to trigger WM_PAINT
> events.
> Any help would be appreciated.
> thanks,
> lee
>
>
> 





More information about the Digitalmars-d mailing list