[win32] - how can i activate the BS_NOTIFY child messages?

the child control is created with BS_NOTIFY for i get it's own messages.
but i belive that i have something wrong with my form control, on window procedure:
1
2
3
4
5
case WM_COMMAND:
                {
                    return DefWindowProc(HandleWindow, WM_COMMAND, wParam, lParam);
                }
                break;

why these code don't activate the buton\child controls message?
What type of message from a button are you trying to receive? All button controls send BN_CLICKED messages to their parent in WM_COMMAND transport. I believe the BN_CLICKED message will be in the HIWORD(wParam), and you would need to specifically test for that if you wanted to filter it out. However, most folks do a switch in the WM_COMMAND just on the LOWORD(wParam) which is the control id (HMENU parameter) from the CreateWindow() call that creates the button. The code you have shown will do nothing.
but i need the parent recent it to the button window procedure
(sorry the time to answer you, but the email way isn't automatic :( )
BS_NOTIFY is a style, bot a message. MSDN says this about it...


Enables a button to send BN_DBLCLK, BN_KILLFOCUS, and BN_SETFOCUS notification messages to its parent window. Note that buttons send the BN_CLICKED notification message regardless of whether it has this style.


If you need to know the HWND of the button, that will be the lParam of the WM_COMMAND message.

I
yes.. i use that style ;)
and thanks for these:
"If you need to know the HWND of the button, that will be the lParam of the WM_COMMAND message. "
1
2
3
4
5
case WM_COMMAND:
                {
                    SendMessage((HWND)lParam , WM_COMMAND, wParam, lParam);
                }
                break;

and now works... thanks for all.. thanks
realy thank you
sorry.. isn't 100%:(
sometimes other button give me the same message :(
why these happens?
i'm testing more ;)
ok.. seems ok now
realy thanks for all
Topic archived. No new replies allowed.