Hello HF,
I would like to update my listbox from a thread, but it is not possible directly so I have to use SendMessage()
Please guide me whats the next step, I am sure I need to peek this message from main thread but have no Idea which function to use.
Any help is appreciated.
Thanks
I would like to update my listbox from a thread, but it is not possible directly so I have to use SendMessage()
Code
void CCMFCApplication1Dlg::OnBnClickedButton1()
{
AfxBeginThread(MyThreadProc, this);//start thread
}
UINT MyThreadProc(void *pParam)
{
CString h=L"SomeText";
CCMFCApplication1Dlg* pThis= (CCMFCApplication1Dlg*)pParam;
pThis->SendMessage(LB_ADDSTRING, (WPARAM)&h);
return 0;
}Any help is appreciated.
Thanks
I +3 rep4rep <3
For website hacking, custom malware, private RAT source code, dumps etc contact me on TG: @yealink2
For website hacking, custom malware, private RAT source code, dumps etc contact me on TG: @yealink2


