コピペしただけだしこの前後知らんからなんともいえんが、
↓のようにできないか?

char str[100];
hRet = g_pDD->SetCooperativeLevel(hWnd, DDSCL_NORMAL);
sprintf(str,"SetCooperativeLevel FAILED(%x)", hRet);
if (hRet != DD_OK)
return InitFail(hWnd, hRet, str);