public void RegisterAppBar(bool register) { Services.Detail.APPBARDATA abd = new Services.Detail.APPBARDATA(); abd.cbSize = Marshal.SizeOf(abd); abd.hWnd = new WindowInteropHelper(this).Handle; if (register) { //register abd.uCallbackMessage = uCallBackMsg; _ = WinAPIWrapper.SHAppBarMessage((int)Services.Detail.ABMsg.ABM_NEW, ref abd); // Check whether there is a full screen app now. HideAllView(CheckHasFullScreenApp(out _)); } else { WinAPIWrapper.SHAppBarMessage((int)Services.Detail.ABMsg.ABM_REMOVE, ref abd); } }
public static extern uint SHAppBarMessage(int dwMessage, ref APPBARDATA pData);