Newbie question, handling form focus messages
-
I have a problem with MDI forms. An MDI form in my application sets focus to a control on it(also scrolls to its location) when the form is clicked/activated/focused. I'm looking a way to prevent it. This is actually a C# application and I have no C++/WinApi knowledge. I tried Spy++ and checked messages it recieves when the mdi form is activated and when this problem occurs. I saw several messages like WM_FOCUS and such. I checked the message number, e.g 0022, and overriden WndProc function of the mdi form and tried to handle it like "if(m.Msg == 0022 || m.Msg == 22)return" for all of the messages includes word "focus" but this didn't do any good. I don't know what else I can do. This is actually a .NET question I posted here but I thought maybe someone with C++/WinApi knowledge could help me with this. It's driving me insane and I appreciate any help.