.net - Unknown Windows Message 0xC052 -
i'm working on problem (how detect form open inside application) , stumbled on windows message can't understand: 0xc052.
this first message receive in messagefilter when form opens. since didn't found reference don't want rely on assumption, message tells me reliable form opened.
edit: added code
application.addmessagefilter(new messagefilterimpl()); class messagefilterimpl : imessagefilter { public bool prefiltermessage(ref message m) { control wnd = form.fromhandle(m.hwnd); if (wnd form) knownforms.add((form)wnd); //m.msg 0xc052 return false; } }
assuming well-formed windows message, it's dynamically allocated id returned registerwindowmessage function (note range 0xc000-0xffff
). function used when need define new windows message that's supposed system-unique. in other words, you can't rely on id - different next time reboot.
.net winforms uses internally plenty of times - it's behaving windows application framework. exact number found might conceivably correspond like:
- a thread callback (
invoke
, friends) - mouse enter message
- get control name (
name
)
and of course, doesn't have .net message - there might application on system broadcasts messages forms, example. it's common way of handling rpc (in case, form received e.g. msuim.msg.rpcsendreceive
).
Comments
Post a Comment