CompuServe Thread

#OnCommand()

2 messages in this thread
#30433From: Tarn Faulkner [MSFT]Jul 10, 1994 7:02 PM
Todd, >> I am overriding the OnCommand handler for several CDialog derived classes so that I can get SET_FOCUS notification messages as the user tabs around a dialog. I use this to update the status bar depending on what controls they are over. This works great for all controls EXCEPT buttons, IE Push Button, Radio's and Check's. How can I get SET_FOCUS messages for these controls in a common routine, without generating a ton of OnSetFocus() handlers? The only doc says to use the OWNER_DRAW style and grab OnDrawItems, but I do not want to make every button in the entire application owner draw just to get what use to be BN_CLICKED messages. Any help is GREATLY appreciated! << I'm afraid you've listed all the options for this that I'm aware of. You may want to also check in the WINSDK forum, though, to verify from the source that there aren't any other options here. Tarn Faulkner Microsoft Developer Support
#30526From: Todd OsborneJul 11, 1994 12:43 PM
Thanks Tarn, but I found a way to get SetFocus() message for buttons in dialog. I just created a miniscule litte CButton derived class that traps WM_SETFOCUS messages and does a PostMessage() to its parent. The only thing that somewhat complicates it, it that you have to SubclassDlg- Item for each of these in InitDialog. What the hell, it works. Thanks!