HWND hWndButton = ....; // 按钮的HWND窗口句柄
UINT nId = GetDlgCtrlD(hWndButton);//按钮ID
PostMessage(GetParent(hWndButton), WM_COMMAND, MAKEWPARAM(nId, BN_CLICKED), LPARAM(hWndButton));
这里是执行单击事件
HWND hWndButton = ....; // 按钮的HWND窗口句柄
UINT nId = GetDlgCtrlD(hWndButton);//按钮ID
PostMessage(GetParent(hWndButton), WM_COMMAND, MAKEWPARAM(nId, BN_CLICKED), LPARAM(hWndButton));
这里是执行单击事件