我需要使用什么 API 函数才能知道任务栏中是否显示了窗口? [英] What API function do I need to use to know if a window is being shown in the taskbar?

查看:31
本文介绍了我需要使用什么 API 函数才能知道任务栏中是否显示了窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用 C# 制作任务栏,我知道如何获取打开的窗口列表,但我必须知道必须在任务栏中显示哪些窗口.我该怎么做?

I am making a taskbar in C# and I know how to get a list of open windows, but I must know what windows I must show in the taskbar. How can I do this?

推荐答案

我不确定确切的算法是否已知,但您不会离此不远:

I'm not sure if the exact algorithm is known, but you will not be far off with something like:

if style & WS_VISIBLE 
{
  if ( ( exstyle & WS_EX_APPWINDOW ) 
  or ( !HasOwnerWindow() and !(exstyle & WS_EX_TOOLWINDOW) ) 
  {
        ShowWindowInYourTaskBar()
  }
}

这篇关于我需要使用什么 API 函数才能知道任务栏中是否显示了窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆