Print to screen?

I'm not that great at C++, although I know a little.

I have a mod for a game, and I wish to edit it, but I cannot figure out a way to print to the screen and keep it there. There are other parts of the source that print to the screen using "TextHooks", but those are truned on and off through a .ini(There are also other options such as "Print" that work with commands and events, but those go away after a fer seconds).

What I wish to do, is print something on the screen that stays there, such as "Version: xxx 1.1" so that it stays, and the user cannot turn it off(Also with coordinates).

Can anyone give me examples on how to do this, or guides ect?

-Thanks
It depends entirely on what system this game is using for output. There's no way we'll be able to tell without seeing code.

If the game is using these "TextHooks" to print text, then you probably need to do something with them. Look around at what other parts of the game are doing to print text, and copy/modify that code to output your own text.
I tried that, but it doesn't show up):

The game is Diablo II if that helps.

Heres an example/definition of the texthook
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
VOID Design::TextHook(INT X, INT Y, DWORD Color, BOOL Automap, INT Font, INT Center, LPSTR Text, ...)
{
	POINT nPos = {X, Y};
	DWORD dwOldSize, wWidth, dwFileNo;

	if (Automap)
	{
		if (!*p_D2CLIENT_AutomapOn)
			return;

		ScreenToAutomap(&nPos, X * 32, Y * 32);
	}

	CHAR szBuffer[800] = "";
	va_list Args;
	va_start(Args, Text);
	vsprintf_s(szBuffer, Text, Args);
	va_end(Args);

	WCHAR wBuffer[0x130];
	MultiByteToWideChar(0, 1, szBuffer, 100, wBuffer, 100);

	dwOldSize = D2WIN_SetTextSize(Font);

	if (Center != -1)
	{
		D2WIN_GetTextWidthFileNo(wBuffer, &wWidth, &dwFileNo);
		nPos.x -= (wWidth >> Center);
	}

	D2WIN_DrawText(wBuffer, nPos.x, nPos.y, Color, -1);
	D2WIN_SetTextSize(dwOldSize);
}



And heres a use of the TextHook
TextHook(V_EscapeInfoX + 46, V_EscapeInfoY + 12, V_EscapeInfoTitleColor, 0, 13, 1, "Chicken Info:");
From the looks of that, I'd guess you'd just call TextHook with different params/text.

Although really, you'd be better off finding a Diablo 2 modding forum and asking there. This isn't a C++ question as much as it's an API question, and I doubt anyone here has used this API.
Topic archived. No new replies allowed.