刚去google了一把,WS_EX_LAYERED ,在WIN8以前,只能用在 top-level 窗口。
这是原话:
Windows 8: The WS_EX_LAYERED style is supported for top-level windows and child windows. Previous Windows versions support WS_EX_LAYERED only for top-level windows.
So it will not set layered attribute to 'child' windows.