getmessage

Prevent C preprocessor to do a specific macro subsitution

How can I tell the preprocessor not to replace a specific macro? The specific problem is the following: Windows header files define the GetMessage macro. My C++ header files with my API have a GetMessage method. I do not want to rename my method. But when using the API on Windows, including windows.h replaces my GetMessage method call ...

Thread does not receive messages

There is a thread in my Delphi application that has a message-waiting loop. Every time it receives a message, it starts doing some work. Here is the execute procedure of that thread: procedure TMyThread.Execute; begin while GetMessage(Msg, 0, 0, 0) and not Terminated do begin {thread message} if Msg.hwnd = 0 then begin ...

Why peekmessage before getmessage?

Why the peekMessage statement is required before Getmessage() for creating message queue? ...