Calling postmessage with user defined message on checkbox's click event

  • Thread starter Thread starter sgrm123
  • Start date Start date
S

sgrm123

Guest
Hi,

I need to execute 10 commands(API) when checking the checkbox. I need to log each API's result in the richeditctrl immediately each api is executed.It will take 1 minute to execute these 10 commands

For that I am calling postmessage on checkbox click event. I am facing below problems.

  1. The checkbox is displayed with checked state only after coming out of ON_BN_CLICKED event.
  2. The richeditctrl is getting updated with text only after coming out of ON_BN_CLICKED event. It is not getting updated when each api is executed.

void CUtilityDlg::OnBnClickedCheck1()
{
if(m_ctrlAutomate.GetCheck())
{
PostMessage(WM_USER_MY_OWN_MESSAGE);
}
}


LRESULT CUtilityDlg::OnUserDefinedMessage(WPARAM wParam, LPARAM lParam)
{
Automate();
return 0;
}

Continue reading...
 
Back
Top