One more, still ten messageboxes but automated:
Code:
#include <windows.h>
typedef int (WINAPI *MyProcA)(HWND, LPCTSTR, LPCTSTR, UINT, WORD, DWORD);
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
HMODULE hUser32 = LoadLibrary("user32.dll");
MyProcA MessageBoxTimeoutA = NULL;
char szInt[32] = {'\0'};
int i;
if(hUser32)
{
MessageBoxTimeoutA = (MyProcA)GetProcAddress(hUser32, "MessageBoxTimeoutA");
if(MessageBoxTimeoutA)
for(i = 1; i < 11; i++)
{
wsprintf(szInt, "%i", i);
/* int MessageBoxTimeoutA(HWND hWnd, LPCTSTR lpText,
* LPCTSTR lpCaption, UINT uType, WORD wLanguageId,
* DWORD dwMilliseconds)
*/
MessageBoxTimeoutA( NULL, szInt, "Information:", MB_OK, 0, i * 150);
}
FreeLibrary(hUser32);
}
return(0);
}