将窗口设置为Topmost的方法

调用Win32 API SetWindowPos()设置:

  1: void SetTopMost(BOOL topMost)
  2: {
  3: 	HWND insertAfter = topMost?HWND_TOPMOST:HWND_NOTOPMOST;
  4: 	::SetWindowPos(GetSafeHwnd(),insertAfter,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
  5: }

posted on 2010-05-07 10:04  wudong  阅读(1752)  评论(0)    收藏  举报

导航