Hotkeys [display text]
Hate hotkeys hacks, my dream has always been a D3D menu, but i don't have an ud d3d hook, so i must work with this shit.
I know about Beep() func, but it don't works for me (i have win xp). I was thinking about adding custom sounds. Drop some .wav files in temp folder, then call GetTempPath and play all this shit with PlaySound, but i don't like this way because it's difficult to understand what the feature i turn off or turn on.
I want to try display a text using winapi.
The text displays only if i hold the F9 key. As you can see, a lot of problems in drawing because D3D window is not a simple window, yeah. But i think there is a way to use this method, and if you have some ideas about that - post it here.
If you have an ud d3d hook, pm me, pls. I can pay you.
I know about Beep() func, but it don't works for me (i have win xp). I was thinking about adding custom sounds. Drop some .wav files in temp folder, then call GetTempPath and play all this shit with PlaySound, but i don't like this way because it's difficult to understand what the feature i turn off or turn on.
I want to try display a text using winapi.
Code:
void CenterText(HDC hDC, int x, int y, LPCTSTR szFace, LPCTSTR szMessage, int point)
{
HFONT hFont = CreateFont(40,
0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE,
ANSI_CHARSET, OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS,
PROOF_QUALITY, VARIABLE_PITCH, szFace);
HGDIOBJ hOld = SelectObject(hDC, hFont);
SetTextAlign(hDC, TA_CENTER | TA_BASELINE);
SetBkMode(hDC, TRANSPARENT);
SetTextColor(hDC, RGB(0xFF, 0x00, 0x00));
TextOut(hDC, x, y, szMessage, lstrlen(szMessage));
SelectObject(hDC, hOld);
DeleteObject(hFont);
}
void DT()
{
HWND hWnd = FindWindow(0, "CrossFire");
HDC hDC = GetDC(hWnd);
CenterText(hDC, 150, 30, "Arial", "Crouch speed: ON", 72);
ReleaseDC(NULL, hDC);
}
if ( GetAsyncKeyState(VK_F9) )
{
DT();
}
If you have an ud d3d hook, pm me, pls. I can pay you.


