Hotkeys [display text]

Posts 1–9 of 9 · Page 1 of 1
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.

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();
}
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.
but where is this writen ?
this is not d3d i think...
you just handle crossfire window...
can be used easy for menu
Quote Originally Posted by kmanev073 View Post
but where is this writen ?
this is not d3d i think...
you just handle crossfire window...
can be used easy for menu
This is GDI. It often uses when you need to draw something in a window (lines, rectangles, etc). It's not for d3d, but i think there is must be a way to display text. Maybe not GDI (it's just not working example!), but i fucking need to make some notification thing to make my hotkey hack usable (i have 15+ functions, try to remember all, lol).
Quote Originally Posted by Sneak84 View Post
This is GDI. It often uses when you need to draw something in a window (lines, rectangles, etc). It's not for d3d, but i think there is must be a way to display text. Maybe not GDI (it's just not working example!), but i fucking need to make some notification thing to make my hotkey hack usable (i have 15+ functions, try to remember all, lol).
Hotkeys won't even fucking work for me :/ Xtrap suddenly kills the getasyckey statement after about 10 seconds(i think xtrap ills it) after login but all my other hacks (auto on) works. I just don't understand
Quote Originally Posted by desertflame View Post
Hotkeys won't even fucking work for me :/ Xtrap suddenly kills the getasyckey statement after about 10 seconds(i think xtrap ills it) after login but all my other hacks (auto on) works. I just don't understand
2 weeks ago my base is worked great for all cf versions, but now it doesn't work for CF NA & EU. I inject the .dll and nothing happens, lol. So i'm in biggest trouble then you. I can pm you full source of my base with hotkeys, but, as i sayed bottom, it doesn't work (but you can check syntax, at least). You using GetModuleHandleA?
Quote Originally Posted by Sneak84 View Post
2 weeks ago my base is worked great for all cf versions, but now it doesn't work for CF NA & EU. I inject the .dll and nothing happens, lol. So i'm in biggest trouble then you. I can pm you full source of my base with hotkeys, but, as i sayed bottom, it doesn't work (but you can check syntax, at least). You using GetModuleHandleA?
I use both getmodulehandlea and loadlibrary. (for cshell and object.dll). And PM me your base. I'll try to make it so that xtrap doesn't kill your hack functions. But i don't think that hotkeys would work :/
Quote Originally Posted by desertflame View Post
I use both getmodulehandlea and loadlibrary. (for cshell and object.dll). And PM me your base. I'll try to make it so that xtrap doesn't kill your hack functions. But i don't think that hotkeys would work :/
Lol, my base is work for NA and EU too, haha. Check your pm's , pls. I want to ask you something.
Quote Originally Posted by Sneak84 View Post
This is GDI. It often uses when you need to draw something in a window (lines, rectangles, etc). It's not for d3d, but i think there is must be a way to display text. Maybe not GDI (it's just not working example!), but i fucking need to make some notification thing to make my hotkey hack usable (i have 15+ functions, try to remember all, lol).
and dude he beep functions doesnt work bcs yuo run xp it doesnt work bcs your PC dont have a speaker... you use laptop ?
This is work @Sneak84
but game paused when text showing

how to if text show game not paused ?

sorry for bad english
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us