I'm working on a small drawing app which adds all the items drawn in my drawing window to a listbox as strings.
I also have a couple of buttons in order to select different drawing tools.
My main window needs keyboad input focus to be able to handle shift and ctrl keypresses.
At first I only had the buttons and no listbox, so after any button was pressed I simply called SetFocus(mainWnd) after i processed WM_COMMAND.
This didn't work as well with the listbox since none of the selections got marked if I called SetFocus(mainWnd) directly after the listbox was clicked on.
Will I have to subclass the listbox and pass it's keyboard messages to my main window in order for everything to work as intended or is there another solution ?