且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何显示"NotifyIconOverflowWindow"窗户?

更新时间:2023-12-02 09:07:28

首先,到底是什么?在第一种情况下,它什么都不做(为什么将某些东西转换成已经存在的东西?),在第二种情况下,它是一个bug(像这样的广播不会使狭窄的字符串变成宽字符串).实际上,第二个强制转换可能是问题的起因,因为宽字符串需要两个字节的NULL.试试这个:
Firstly, what the hell is all the casting for? In the first case it does nothing (why cast something to what it already is?) and in the second it''s a bug (casting like this doesn''t make a narrow string a wide one). In fact the second cast is probably the casue of the problem as wide strings need a two byte NULL. Try this:
pop = FindWindow(L"NotifyIconOverflowWindow", NULL);
ShowWindow(pop, SW_SHOWNORMAL);


停止投射!


Stop casting!


看起来像第一次通过任务栏中的三角形按钮弹出窗口时呈现的窗口内容.因此,如果这没有发生,那么以这种方式显示窗口时,您显然会看到一个空白窗口.

不过,您可以尝试向按钮发送鼠标左键,这样一来,您将始终确保窗口显示时可以正确渲染该窗口.
Looks like the window contents are rendered the first time the window is popped up via the triangular button in the task bar. So if that has not happened, then obviously you will see a blank window when you show the window in this manner.

You could try sending a left mouse click to the button though, that way you will always be sure that the window will be properly rendered when it shows up.