News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Do all messages go to subclassproc?

Started by xandaz, January 19, 2011, 08:48:51 PM

Previous topic - Next topic

xandaz

    hey... i was trying to subclass a toolbar to isolate the controls but WM_COMMAND doesnt seem to get to the subclassproc. Althought i SetSubclassProc WM_COMMAND goes to the MainWindowProc. Does anyone know why? I've put a Beep in SubclassProc entry and i noticed that some messages get there. Like WM_NOTIFY and Mouse operations. Can someone clarify me pls? I hope that this is no trouble. I noticed that lately most posts don't get answered so.... if it wheren't much trouble.... Bye and thanks
    T

qWord

AFAIK the toolbar is one control - there are no child controls for the buttons. This is the reason, why the toolbar doesn't receive the WM_COMMAND message when the user clicks an button.
FPU in a trice: SmplMath
It's that simple!

xandaz

    So toolbars shouldnt be subclassed? i subclasses an edit control and the proc works perfectelly. I don't think that an edit control has child items either. thanks

MichaelW

AFAIK a subclass procedure receives all messages that are sent to the original window procedure. At least normally, WM_COMMAND is not sent to a control window procedure, it is sent by a control to its parent window.
eschew obfuscation

xandaz

    thanks... that was clarifying. Thanks guys.