zaafar / ClickableTransparentOverlay

A library for creating transparent overlay using windows API & ImGui.NET
Apache License 2.0
87 stars 33 forks source link

GetWindowDrawList does not work in an library #66

Closed TwoTenPvP closed 1 month ago

TwoTenPvP commented 4 months ago

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

zaafar commented 4 months ago

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

zaafar commented 1 month ago

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.