是否有办法发出<代码>的电话。 允许SetForegroundWindow(ASFW_ANY)?
大图片:
- I want a single process of my exe running at a time.
- To achieve it, the processes communicates with each other using named pipes & if a process already exists, its window has to be brought into front.
- To be able to do this, the latest process must set
AllowSetForegroundWindow()
with the existing process id.- I do not want to fetch the process id (sorry for my laziness), so what I m planning to do is: 1. call
AllowSetForegroundWindow()
with ASFW_ANY 2. Just in case some error occurred, undo the call toAllowSetForegroundWindow()
so that others cannot steal focus from my process.
- I do not want to fetch the process id (sorry for my laziness), so what I m planning to do is: 1. call
简言之,我想允许其他进程从我那里偷走重点,在某个时间窗口中,只有......。
任何人都曾遇到过类似的问题,发现有任何工作关系?
另外,请让我知道,你是否有任何更好的建议。