Re: SendMessage Returns a Value?
- Posted by Evan Marshall <1evan at sbcglobal.net> Mar 23, 2004
- 453 views
No. I see now that WM_FONTCHANGE returns 0, others may return handles or TRUE, etc. Evan Marshall wrote: > > From the SDK: The return value specifies the result of the message > processing; it depends on the message sent. > > It appears that a WM_FONTCHANGE message will return 0. Maybe > SendMessage will return 0 for any message unless you specify a > different value? > > i.e. > > if uMsg = WM_FONTCHANGE then > return 100 > end if > > will return 100 as a result > > whereas > > if uMsg = WM_FONTCHANGE then > end if > > returns 0 > > > C. K. Lester wrote: > >> >> I've looked up SendMessage info at msdn, but can't find return values >> for success/fail. Does anybody know how to determine if the message >> was sent or received properly? >> >> Here's the snippet of code I'm using... >> >> -- call AddFontResource >> if AddFontResource != -1 then >> junk = allocate_string( "free000.ttf" ) >> if xSendMessage!= -1 then >> fonter = c_func( AddFontResource, { junk } ) >> if fonter != 0 then >> junk = c_func(xSendMessage,{HWND_BROADCAST, >> WM_FONTCHANGE, 0, 0}) >> -- RIGHT HERE... HOW DO I DETERMINE IF xSendMessage completed properly? >> didAddFontResource = (1=1) >> else >> errMsg = "AddFontResource failed." >> end if >> else >> errMsg = "Could not access SendMessage." >> end if >> free(junk) >> else >> errMsg = "Could not access AddFontResource." >> end if >> >> >> For Topica's complete suite of email marketing solutions visit: >> http://www.topica.com/?p=TEXFOOTER >> >> > > > For Topica's complete suite of email marketing solutions visit: > http://www.topica.com/?p=TEXFOOTER > >