VC获取窗口句柄后为什么没法立即隐藏该窗口
VC获取窗口句柄后为什么无法立即隐藏该窗口?
rt,在程序中我已经获取了该窗口句柄,但是用方法:ShowWindow()却无法立即实现隐藏,需要在获得窗口句柄后sleep一定时间再调用才能生效。谁能告诉我怎么回事?
------解决方案--------------------
*Don't try to use FindWindow if you want to get a window that's in another process!!!*
Instead use EnumWindows and EnumWindowsProc and search through the window titles using SendMessage and WM_GETTEXT. It's a pain, but it's the only way. :/
rt,在程序中我已经获取了该窗口句柄,但是用方法:ShowWindow()却无法立即实现隐藏,需要在获得窗口句柄后sleep一定时间再调用才能生效。谁能告诉我怎么回事?
------解决方案--------------------
*Don't try to use FindWindow if you want to get a window that's in another process!!!*
Instead use EnumWindows and EnumWindowsProc and search through the window titles using SendMessage and WM_GETTEXT. It's a pain, but it's the only way. :/