Send a BM_CLICK
message to the HWND of the button:
SendMessage(hButton, BM_CLICK, 0, 0);
That causes the button to receive WM_LBUTTONDOWN
and WM_LBUTTONUP
messages, and the parent to receive an BN_CLICKED
notification, as if the user had physically clicked on the button.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…