Re: SendMessage Returns a Value?

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message ----- 
From: "C. K. Lester" <euphoric at cklester.com>
To: <EUforum at topica.com>
Subject: Re: SendMessage Returns a Value?


> 
> 
> Derek Parnell wrote:
> 
> >Because this is sendiong a message to many windows running in other
> >applications, the range of possible errors is too large to be represented by a
> >single return value. So there is no return value. Either the other windows will
> >be the message or not. Maybe you should us PostMessageA instead, as this always
> >returns a true/false and does not wait for all windows to be notified before
> >returning to your application.
> >  
> >
> What does this statement mean: "Applications that need to communicate 
> using HWND_BROADCAST should use the RegisterWindowMessage 
>
> <http://msdn.microsoft.com/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/MessagesandMessageQueues/MessagesandMessageQueuesReference/MessagesandMessageQueuesFunctions/RegisterWindowMessage.asp>
>
> function to obtain a unique message for inter-application communication."
> 
> Does that apply to what I'm trying to do (which is just install a font 
> and then HWND_BROADCAST a WM_FONTCHANGE message, for holy's sake).

No. The WM_FONTCHANGE message is a predefined one that all apps should know
about. Its talking about 'normal' app-to-app communications. If one has two
applications that need to send messages to each other, the RegisterWindowMessage
is needed to create a unique message number in the system for those apps to pass.
Not required for font changes.

 
-- 
Derek

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu