The idea is to have many MessageBox() calls, each within their own thread.
The catch is, each thread has to be dynamically created.
At first, being a noob, I tried this:

void Go[10](void)
{
		MessageBox(NULL, _T("..."), _T("..."), MB_OK);
}
..........
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Go[i], NULL, NULL, NULL);

That, obviously, didn't work.
Any other suggestions out there? :icon_cheesygrin:

I'm not sure what you mean. Can you explain what you're trying to accomplish again? What contains what?

Do you have an array that contains the threads, and each thread contains messagebox()'s?

I'm not sure what you mean. Can you explain what you're trying to accomplish again? What contains what?

Do you have an array that contains the threads, and each thread contains messagebox()'s?

In the example above, I tried to create an array of functions.
Then I tried turned each function into it's own thread.
Creating an array of functions obviously doesn't work though.
Whenever you call MessageBox(), it stops the code flow until the user closes out of the message box, then it continues.
So, if you kept calling MessageBox(), it'd just keep appearing one after the other. After you close one, another would appear.
I want it so that hundreds of message boxes appear at one time, which appears to be only possible if you have multiple threads.
I'm not allowed to type out hundreds of threads/functions though.

Edited 7 Years Ago by FBIRyan: n/a

This article has been dead for over six months. Start a new discussion instead.