Tu peux aussi utiliser la fonction MessageBoxIndirect()
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR p, int n )
{
int i = 0;
MSGBOXPARAMS mbp = {sizeof(MSGBOXPARAMS)};
mbp.hInstance = LoadLibrary("shell32");
mbp.lpszCaption = "MessageBoxIndirect";
mbp.lpszText = "MessageBox\navec icone personnalisée !";
mbp.dwStyle = MB_RETRYCANCEL | MB_DEFBUTTON1 | MB_USERICON;
do
mbp.lpszIcon = MAKEINTRESOURCE(++i);
while(MessageBoxIndirect(&mbp) == IDRETRY);
FreeLibrary(mbp.hInstance);
return 0;
}