void ChatControlMessageLocation::render(HDC deviceContext, int x, int y, int clientHeight)
{
	renderPreviewBitmap(deviceContext, x + 5, y + 5);

	int yText = 0;

	if (getPreviewBitmapHeight() > 0)
	{
		yText += getPreviewBitmapHeight() + 10;
	}

	SetTextColor(deviceContext, RGB(0, 0, 0));
	drawText(deviceContext, text, x, y + yText, getWidth(), static_cast<HFONT>(GetStockObject(DEFAULT_GUI_FONT)));
}
int ChatControlMessageLocation::calculateHeight()
{
	int height = getPreviewBitmapHeight();

	HDC deviceContext = GetDC(NULL);
	height += calculateDrawTextHeight(deviceContext, text, getWidth(), static_cast<HFONT>(GetStockObject(DEFAULT_GUI_FONT)));
	ReleaseDC(NULL, deviceContext);

	if (getPreviewBitmapHeight() > 0)
	{
		height += 10;
	}

	return height;
}
int ChatControlMessageImage::calculateHeight()
{
	return getPreviewBitmapHeight() + 10;
}