//用过快播的朋友应该知道快播的窗口总是在最上方显示,下面通过简单代码实现这一功能,虽然效果不是很好,呵呵
switch (message)
{
case WM_CREATE:
{
SetTimer(hWnd,1,33,NULL);
break;
}
case WM_TIMER:
{
RECT rect;
GetClientRect(hWnd,&rect);
SetForegroundWindow(hWnd);
break;
}
}
//还有另一种系统提供的方法:
RECT rect;
GetClientRect(hwnd,&rect);
SetWindowPos(hwnd,HWND_TOPMOST,0,0,rect.right,rect.bottom,SWP_SHOWWINDOW);