i am trying to create a simple messagebox
afxmessagebox will do just fine but the problem is
- it blocks my main application
- i cannot create multiples messagebox (which i need to)

so after snooping around the place, i discovered that a solution would be to create a worker thread to handle the messageboxes

here's my code

UINT pg_price::th_msgbox ( LPVOID lpvParam ) 
    pg_price *th_msgbox = (pg_price*)lpvParam;
	CDialog* pDialog;
	pDialog = new CDialog();
	pDialog->Create(IDD_MESSAGEBOX, NULL);
    return 0;

here's how it's called:
void pg_price::OnSomeEvent() 
	AfxBeginThread ( th_msgbox, (LPVOID)this );
but the problem is that the messagebox displays for a split second and disappears. i believe it's because the worker thread returns and hence the dialog goes? or is there another reason for that??

how do i solve this problem of creating a dialog messagebox that
- doesnt block my main application
- allows my main application to continue running,processing
- multiple messageboxes

please assist:wave: