Skip to content

ShowMessageBoxFlags

Athanatos edited this page Jun 29, 2019 · 3 revisions

Behiavour

Shows a message box with the specified flags. This function is not exported, so it can't be used in 3D Rad.

Definition

void ShowMessageBoxFlags(float *args, int flag)
{
	char *message = new char[255];
	char *title = new char[255];
	int i;
	for (i = 0; i < 255; i++)
	{
		if ((int)args[i]) message[i] = (int)args[i];
		else
		{
			message[i] = 0;
			break;
		}
	}
	int j = 0;
	i += 1;
	for (; i < 512; i++, j++)
	{
		if ((int)args[i]) title[j] = (int)args[i];
		else
		{
			title[j] = 0;
			break;
		}
	}
	MessageBoxA(nullptr, message, title, flag);
	delete[] message;
	delete[] title;
}

Notes

1.) Almost the same as the MSGBOX function example.

2.) Doesn't return the MessageBox's button value.

Clone this wiki locally