Advertisement

[Win32 API]Help habdleing some messages in my subclass

Started by August 17, 2001 11:13 AM
1 comment, last by Clash Rocker 23 years, 6 months ago
In my subclassed edit contols... 1)When the user passes VK_RETURN to my program I would like to pass the keyboard focus to the next window. I''m handeling VK_RETURN allright, but how do I set the focus in the tab order (the tab layout thing created at design time)? 2)Handling EN_CHANGE in my subclassed edit control. In my none subclasses I handle EN_CHANGE to check if the user has typed in a too higher integer value. How would I do such a thing in a subclassed control? I am unable to handle EN_CHANGE. TIA
For your first question, try using the GetWindow function and pass the current edit control in the hwnd parameter, and GW_HWNDNEXT in the uCmd parameter. Use the HWND returned from the function in a call to SetFocus(). I think this will work with the tab order, but I am not positive. I am just guessing, mostly. I haven''t really done this too often, so don''t be surprised if that didn''t work.

For your second question, I don''t really understand. Are you trying to process EN_CHANGE from within your window procedure? Because you should be able to as long as your subclassed control is still sending its messages to the window proc. Maybe I misunderstood, could you explain your problem again?
Advertisement
Thanks for the help. Number one is down
2)I normally handle EN_CHANGE in my dialog procedure. But because I have lots of edit contorls I''ve decided to subclass them to reduce code. How I would I handle EN_CHANGE in the subclass procdure, not the main window/dialog procedure?

This topic is closed to new replies.

Advertisement