如何在vc ++中使用LIBVLC从VLC Media Player隐藏标题栏(VLC Direct 3d输出)

时间:2019-02-28 05:31:47

标签: libvlc

我在vc ++中使用libvlc。我想从VLC输出窗口(VLC 3D Direct OUTPUT)隐藏标题栏。我们可以隐藏或删除此标题栏吗?

1 个答案:

答案 0 :(得分:0)

foreach (var handle in EnumerateProcessWindowHandles(Process.GetCurrentProcess().Id))
{
    StringBuilder message = new StringBuilder(1000);
    SendMessage(handle, WM_GETTEXT, message.Capacity, message);
    if (message.ToString().Equals("VLC (Direct3D11 output)"))
    {
        var style = (SetWindowLongFlags)GetWindowLong(handle, WindowLongIndexFlags.GWL_STYLE);

        style &= ~SetWindowLongFlags.WS_BORDER;

        SetWindowLong(handle, WindowLongIndexFlags.GWL_STYLE, style);
    }
}