如果你使用Win2000你可能很难用WinApi完成你的功能,因为:
Windows NT 5.0 and later: An application cannot force a window to the foreground while the user is working with another window. Instead, SetForegroundWindow will activate the window (see SetActiveWindow) and call theFlashWindowEx function to notify the user.
如果你一定需要完成这个功能,可以看看下面这个帖子中的一个例子,不过好像有点复杂:
http://expert.csdn.net/Expert/topic/2221/2221820.xml?temp=.5793726