Solved Directx9 Transparent Brushes?

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

austin101006

Full Member
Jul 14, 2020
11
147
1
Game Name
N/A
Anticheat
N/A
Tutorial Link
N/A
How long you been coding/hacking?
1 month 30 days
Coding Language
C++
Hello I recently switched from OpenGL and I am wounder if its possible to make a overlay with a transparent brush I've tried NULL_BRUSH but that just makes it completely white
 

austin101006

Full Member
Jul 14, 2020
11
147
1
I'm no expert with overlays, why can't you use WS_EX_TRANSPARENT like in the OpenGL overlay?
all you got to do is this HBRUSH removeselectedpixels = 0xHEXCOLOR;
hWnd = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOPMOST, L"WndClass", L"FOverlay", WS_OVERLAPPED, 1, 1, Width, Height, NULL, NULL, hInst, NULL);

SetLayeredWindowAttributes(hWnd, removeselectedpixels, 50, LWA_COLORKEY);
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,067
78,998
2,371
I'm no expert with overlays, why can't you use WS_EX_TRANSPARENT like in the OpenGL overlay?
 

austin101006

Full Member
Jul 14, 2020
11
147
1
Found a solution when creating a window do CreateWindowEx(WS_EX_LAYERED, L"WndClass", L"OverlayThatsSuperFunnyGang", WS_OVERLAPPED, 500, 500, 500, 400, NULL, NULL, hInst, NULL) and after that do SetLayeredWindowAttributes(hWnd, 0, 200, LWA_ALPHA);
 

jacobawesome7

Professional Scratch Programmer
Trump Tier Donator
Full Member
Nobleman
May 23, 2019
77
1,068
1
I'm no expert with overlays, why can't you use WS_EX_TRANSPARENT like in the OpenGL overlay?
WS_EX_TRANSPARENT just allows mouse clicks to fall through the window. You need DwmExtendFrameIntoClientArea or SetLayeredWindowAttributes to make it transparent.
 
  • Like
Reactions: Rake

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,067
78,998
2,371
WS_EX_TRANSPARENT just allows mouse clicks to fall through the window. You need DwmExtendFrameIntoClientArea or SetLayeredWindowAttributes to make it transparent.
Thank you

So to update my question:

the OP previously asked how to do transparent opengl overlays and I sent him:

C++:
HWND = CreateWindowEx(
    WS_EX_TRANSPARENT | WS_EX_TOPMOST | WS_EX_LAYERED,
    WName,
    WName,
    WS_POPUP | WS_VISIBLE | WS_MAXIMIZE,
    WindowRect.left,
    WindowRect.top - 1,
    SWidth,
    SHeight + 1,
    NULL, NULL, CurrentInstance, NULL);

SetLayeredWindowAttributes(HWND, RGB(0, 0, 0), 255, LWA_COLORKEY | LWA_ALPHA);
So my question is, why not just use the same thing for D3D?

@austin101006 can you explain what you mean by transparent brush and how this is different from a regular overlay?

I'm gonna write a guide about overlay so I need the infos
 

jacobawesome7

Professional Scratch Programmer
Trump Tier Donator
Full Member
Nobleman
May 23, 2019
77
1,068
1
Thank you

So to update my question:

the OP previously asked how to do transparent opengl overlays and I sent him:

C++:
HWND = CreateWindowEx(
    WS_EX_TRANSPARENT | WS_EX_TOPMOST | WS_EX_LAYERED,
    WName,
    WName,
    WS_POPUP | WS_VISIBLE | WS_MAXIMIZE,
    WindowRect.left,
    WindowRect.top - 1,
    SWidth,
    SHeight + 1,
    NULL, NULL, CurrentInstance, NULL);

SetLayeredWindowAttributes(HWND, RGB(0, 0, 0), 255, LWA_COLORKEY | LWA_ALPHA);
So my question is, why not just use the same thing for D3D?

@austin101006 can you explain what you mean by transparent brush and how this is different from a regular overlay?

I'm gonna write a guide about overlay so I need the infos
You can use that with D3D. If you want, I can DM you my transparent overlay source code that I use with DirectX. It should work with OpenGL too, I don't see why it wouldn't.
 
  • Like
Reactions: Rake
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