WTL 自绘制控件的有关问题,多谢

WTL 自绘制控件的问题,谢谢。
我需要做一个自绘制控件,我在控件里面处理了WM_LBUTTONDOWN and the WM_LBUTTONUP 消息,但是在父亲窗口中没有收到BN_CLICK 消息。我做了个尝试:如果在控件类里面不处理WM_LBUTTONDBCLK,那么双击时可以收到BN_CLICK 消息。如果处理了,将收不到,请高手帮忙看下。谢谢。

I did a owner draw button , when i due to the WM_LBUTTONDOWN and the WM_LBUTTONUP in this owner draw button class, then i need to use the DEFAULT_REFLECTION_HANDLER to reflect the message. then i want to receive the BN_CLICK message in the father window , but i can not receive the BN_CLICK message.so i can not implement the some function.


Thank you for help me,Best wishes for you ,i do a demo if you need, thanks.
some code like follow:

CEwtlButton.h
class CCEwtlButton :
public CWindowImpl <CCEwtlButton,CButton> 
{
public:
BEGIN_MSG_MAP(CCEwtlButton)
CHAIN_MSG_MAP(CCEwtlButton)

  //when i use MESSAGE_HANDLER due to WM_LBUTTONDOWN
  //the father window can not receive the command message.
MESSAGE_HANDLER(WM_LBUTTONDOWN,OnLButtonDown) 
  MESSAGE_HANDLER(WM_LBUTTONUP,OnLButtonUp)
  MSG_OCM_DRAWITEM(DrawItem)
DEFAULT_REFLECTION_HANDLER()
END_MSG_MAP()

  LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
  SetMsgHandled(false);
return 0;
}
LRESULT CCEwtlButton::OnLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&amp; bHandled)
{
SetMsgHandled(false);
return 0;
}

MainDlg.h


#include "CEwtlButton.h"

class CMainDlg : public CDialogImpl&lt;CMainDlg&gt;,
public CWinDataExchange&lt;CMainDlg&gt;
{
public:
enum { IDD = IDD_MAINDLG };

BEGIN_MSG_MAP(CMainDlg)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
COMMAND_ID_HANDLER(IDC_BT_PLAY,OnBnClickedButton1)
REFLECT_NOTIFICATIONS()
END_MSG_MAP()

BEGIN_DDX_MAP(CMainDlg)
DDX_CONTROL(IDC_BT_PLAY,m_CtrlPlay)
END_DDX_MAP()




LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL&amp; /*bHandled*/)
{
// center the dialog on the screen
CenterWindow();

// set icons
HICON hIcon = (HICON)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_MAINFRAME), 
IMAGE_ICON, ::GetSystemMetrics(SM_CXICON), ::GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR);
SetIcon(hIcon, TRUE);
HICON hIconSmall = (HICON)::LoadImage(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDR_MAINFRAME), 
IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
SetIcon(hIconSmall, FALSE);


m_CtrlPlay.SetBitmapId(IDB_PLAY_NORMAL,IDB_PLAY_NORMAL,IDB_PLAY_OVER,IDB_PLAY_OVER);

DoDataExchange(FALSE);

return TRUE;
}


  LRESULT OnBnClickedButton1(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL&amp; /*bHandled*/)
{
return 0; //can not run to here.:~
}

public:
CCEwtlButton m_CtrlPlay;
};

------解决方案--------------------
BEGIN_MSG_MAP(CCEwtlButton)
CHAIN_MSG_MAP(CCEwtlButton)//删除这行代码试一试

//when i use MESSAGE_HANDLER due to WM_LBUTTONDOWN
//the father window can not receive the command message.
MESSAGE_HANDLER(WM_LBUTTONDOWN,OnLButtonDown)
MESSAGE_HANDLER(WM_LBUTTONUP,OnLButtonUp)
MSG_OCM_DRAWITEM(DrawItem)
DEFAULT_REFLECTION_HANDLER()
END_MSG_MAP()
------解决方案--------------------
MK