ShowWindow( SW_SHOW );
SetWindowPos( &wndTopMost , 0 , 0 , 0 , 0 , SWP_NOSIZE|SWP_NOMOVE);
SetWindowPos( &wndNoTopMost , 0 , 0 , 0 , 0 , SWP_NOSIZE|SWP_NOMOVE );
SetForegroundWindow();
HWND hCurWnd = NULL;
DWORD lMyID;
DWORD lCurID;
hCurWnd = ::GetForegroundWindow();
lMyID = ::GetCurrentThreadId();
lCurID = ::GetWindowThreadProcessId(hCurWnd, NULL);
::AttachThreadInput( lMyID, lCurID, TRUE);
SetForegroundWindow();
::AttachThreadInput( lMyID, lCurID, FALSE);
SetWindowPos( &wndTopMost , 0 , 0 , 0 , 0 , SWP_NOSIZE|SWP_NOMOVE);
SetWindowPos( &wndNoTopMost , 0 , 0 , 0 , 0 , SWP_NOSIZE|SWP_NOMOVE );
SetForegroundWindow();
HWND hCurWnd = NULL;
DWORD lMyID;
DWORD lCurID;
hCurWnd = ::GetForegroundWindow();
lMyID = ::GetCurrentThreadId();
lCurID = ::GetWindowThreadProcessId(hCurWnd, NULL);
::AttachThreadInput( lMyID, lCurID, TRUE);
SetForegroundWindow();
::AttachThreadInput( lMyID, lCurID, FALSE);
本文介绍了一种使用Windows API进行窗口操作的方法,包括显示窗口、设置窗口置顶状态、切换前台窗口等实用技巧。通过具体代码展示了如何实现这些功能。
397

被折叠的 条评论
为什么被折叠?



