ClickableTransparentOverlay icon indicating copy to clipboard operation
ClickableTransparentOverlay copied to clipboard

GetWindowDrawList does not work in an library

Open TwoTenPvP opened this issue 2 years ago • 1 comments

If I create a overlay in for example a Console application, everything works fine.

If I however create the same overlay in a class library, then import that class library into a Console application, everything seems to work except the GetWindowDrawList, nothing is being drawn.

This is currently blocking me from using the library.

Thanks

TwoTenPvP avatar Mar 06 '24 18:03 TwoTenPvP

Let me know what I need to do in order to fix the issue.

zaafar avatar Mar 07 '24 01:03 zaafar

okay, i have finally realized why it wasn't working for you. for GetWindowDrawList to work, imgui requires you to create an imgui window. try using the following, which doesn't require you to create imgui window.

        ImGui.GetForegroundDrawList();
        ImGui.GetBackgroundDrawList();

please note that imgui window != CTO/Win32 window.

zaafar avatar May 16 '24 03:05 zaafar