i have 1 problem with window procedure(i belive), the child controls have the BS_NOTIFY style, but the click or others(from BS_NOTIFY style) aren't working.. why?

//in button window procedure:
case WM_COMMAND:
            {
                switch(HIWORD(wParam))
                {
                    case BN_CLICKED:
                    {
                        inst->MouseClick();
                        MessageBox(NULL,"hi","hello",MB_OK);
                    }
                    break;
                }
                break;
            }
            break;

//in form window procedure:
case WM_COMMAND:
                {
                    return DefWindowProc(HandleWindow, WM_COMMAND, wParam, lParam);
                }
                break;

what i'm doing wrong?

in form WM_COMMAND message i must do:

SendMessage((HWND)lParam , WM_COMMAND, wParam, lParam);

and now works fine ;)
thanks
readers: if some message don't works, see how you did the Message Loop.. yes i by experience, i lose some keys... but change for the normal Message Loop, works fine ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.