[haiku-development] Re: Intercepting messages between the applications and App. Server

  • From: Jérôme Duval <korli@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 29 May 2009 20:05:56 +0200

2009/5/29 Yashasvi A.C. <yashasviac@xxxxxxxxx>:
> Thanks for the help. I figured it out. :) Was a problem with the namespace
> of the function.
> When I try to print out message->what, it prints out a number like
> 1400700986 or something similar of that sort. Is there any way where I can
> access the name of the message, like MOUSE_DOWN or CLICK or something like
> that? Under BMessage, only "what" is listed as a data member.

Usually one can use :
printf("%c%c%c%c", char(what >> 24), char(what >> 16), char(what >>
8), (char)what);

MOUSE_DOWN would display as _MDN

Bye,
Jérôme

Other related posts: