Messaging system
-
Does someone know where I can find a good explaination of message handling in C#? i.e. how do the PreProcessFilter and WndProc methods work? Initially I thought that everything in the windows enviroment is plugged into a central message system and PreProcessFilter selects which messages are relevant to a control or form and this gets passed into WndProc and handled. But now I don't think that's right. Here's an example of what I'm doing. I have a windows form that overrides CreateParams so that it shows like a tooltip or context menu, it won't take focus or activation so I can't use the LostFocus event to close the window when I click off of it. So I figured I would have to override something in the messaging system to do this but I'm a little lost. any ideas? thanks, Jesse
-
Does someone know where I can find a good explaination of message handling in C#? i.e. how do the PreProcessFilter and WndProc methods work? Initially I thought that everything in the windows enviroment is plugged into a central message system and PreProcessFilter selects which messages are relevant to a control or form and this gets passed into WndProc and handled. But now I don't think that's right. Here's an example of what I'm doing. I have a windows form that overrides CreateParams so that it shows like a tooltip or context menu, it won't take focus or activation so I can't use the LostFocus event to close the window when I click off of it. So I figured I would have to override something in the messaging system to do this but I'm a little lost. any ideas? thanks, Jesse
See this thread and Heath answer, maybe it helps. http://www.codeproject.com/script/comments/forums.asp?msg=777699&forumid=1649&XtraIDs=1649&searchkw=ImessageFilter&sd=3%2F19%2F2003&ed=6%2F17%2F2004#xx777699xx[^] Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji -
Does someone know where I can find a good explaination of message handling in C#? i.e. how do the PreProcessFilter and WndProc methods work? Initially I thought that everything in the windows enviroment is plugged into a central message system and PreProcessFilter selects which messages are relevant to a control or form and this gets passed into WndProc and handled. But now I don't think that's right. Here's an example of what I'm doing. I have a windows form that overrides CreateParams so that it shows like a tooltip or context menu, it won't take focus or activation so I can't use the LostFocus event to close the window when I click off of it. So I figured I would have to override something in the messaging system to do this but I'm a little lost. any ideas? thanks, Jesse
See the ongoing discussion at http://www.codeproject.com/script/comments/forums.asp?forumid=1649&select=853699&df=100&noise=1&fr=46.5#xx853699xx[^]. This may help.
Microsoft MVP, Visual C# My Articles