Solved [C++] Drawing text wont display in window

  • CSGO recently moved logic from 'client_panorama.dll' to 'client.dll', you must update all code that uses 'client_panorama.dll' and replace it with 'client.dll' or the code will not work.
Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Deeply

Newbie
Full Member
Mar 25, 2015
11
92
2
Hi guys!

So, I'm currently learning more and more about game hacking. I got an issue that i hope someone here can help me with. When running the code below, it works fine in notepad, aassaultcube etc. However, when i try to do the same thing inside of a csgo window, nothing get displayed? Is there something i should know about this, or maybe it's not even possible todo with csgo?

C++:
	//ShowWindow(FindWindowA("ConsoleWindowClass", NULL), false); //Hide Window
	HWND wHANDLE = FindWindow(0, "Counter-Strike: Global Offensive"); 	//Find WindowNames Window
	HDC hDCArea = GetDC(wHANDLE); //Retrieve DEVICE CONTEXT for the client specified window.
	DWORD ProcessID;
	GetWindowThreadProcessId(wHANDLE, &ProcessID);
	HANDLE wProcHandle;

	//Get Window Demensions
	RECT REC;
	GetWindowRect(wHANDLE, &REC);

	//Text
	PAINTSTRUCT ps;

	BeginPaint(wHANDLE, &ps);

	COLORREF PINK(RGB(253, 215, 228));
	SetTextColor(hDCArea, PINK);
	TextOutA(hDCArea, x, y, "Hello World", 11);

	SetBkMode(hDCArea, TRANSPARENT);
 

Deeply

Newbie
Full Member
Mar 25, 2015
11
92
2
Well, i never figured out what the problem was, i tried everything, all other games worked without problems. Switched to directx overlay, and that worked so i'll just stick with that, instead of this shitty windows drawing.
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,294
37,938
269
well it would help if you told us where it went wrong.
Are you getting the window handle
are you getting the dc
do you get the proper dimensions?
 

Deeply

Newbie
Full Member
Mar 25, 2015
11
92
2
Well, as i said. It works great in all other programs (tested with notepad, battlefield and assault cube) there is no errors (no compiler errors as well), so why should it not be working in csgo? unless csgo has something tag prevent my method to be overlayed.

I've seen the same method being used before (in csgo) i think even fleep did something similar.

Are you getting the window handle? Yes.
are you getting the dc? Yes.
do you get the proper dimensions? Yes.
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,294
37,938
269
If you say it works on everything else, then there's clearly some inherent difference with csgo.

Is CSGO running as admin and you arent?
Are you 100% certain you have the right window class/name? I believe its easier to use the class name for valve games.

Stop making me have to guess.

Post screenshots, post values at various stages through breakpoints
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods