xoofx / NPlug

Develop VST3 audio native plugins with .NET
Other
107 stars 8 forks source link

Cannot hook window correctly #8

Open jxqu3 opened 3 months ago

jxqu3 commented 3 months ago

Hello! This library is amazing and I'm glad it exists, but I'm trying to get an UI working and I've tried with Raylib.

I used this attached method:


public unsafe void Attached(nint parent, AudioPluginViewPlatform type)
    {
       Raylib.InitWindow(ViewSize.Item1, ViewSize.Item2, "NPlug.SimpleDelay");
       IntPtr winHandle = (nint)Raylib.GetWindowHandle();
       SetWindowPos(winHandle, parent, 0, 0, 0, 0, 0x0401 /*NOSIZE | SHOWWINDOW */);
       SetParent(winHandle, parent);
       ShowWindow(winHandle, 0x5);

       while (!Raylib.WindowShouldClose())
       {
           Raylib.BeginDrawing();
           Raylib.ClearBackground(new Color(255, 255, 255, 255));
           Raylib.EndDrawing();
       }

       Raylib.CloseWindow();
    }

However, this doesn't work. image

Any help?

jwb-music commented 1 week ago

Hi @jxqu3,

You can reach out to me a joseph@jwb-music.com and I can assist you with getting several different UI options working. I am still testing my frameworks, they are working, but I am still doing refactoring and extensive testing. When I feel they are well documented, and sufficient for public posting, I will be submitting them to the repos for review and hopefully commit.