如何使自己的窗口居前不被别的窗口遮拦 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以去msdn看一下setwindowpos这个函数 SDK:SetWindowPos(youHwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);MFC:SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); SetWindowPos(&wndTopMost,0,0,0,0,SWP_TOPMOST) CWnd*pMainWnd=AfxGetMainWnd();pMainWnd->SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);恢复则pMainWnd->SetWindowPos(&wndNoTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); const CWnd * pWndInsertAfter; pWndInsertAfter = &wndTopMost; SetWindowPos(pWndInsertAfter,0,0,GetSystemMetrics(SM_CXSCREEN),GetSystemMetrics(SM_CYSCREEN), SWP_NOSIZE | SWP_NOMOVE); //置于最顶端 失去焦点后照样置于其他顶层窗口下面;SetWindowPos函数只是相对而已;操作系统不允许一个程序独占机器的控制权; onpaint oninitdialog奇怪的问题 关于WM_TIMER消息函数应用问题 无法派生CPropertyPage的问题 socket创建失败,不清楚问题在哪? Windows Service编程中碰到的createProcess问题 高手,请教CEditView的用法(100分) 托盘区的两个小问题,快来拿分! 初始选中问题,急求 有关sendmessage的问题 用VC对串口操作的程序? 如何安装屏保文件? 如何得到ODBC数据源的数据库类型?
MFC:SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
pMainWnd->SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
恢复则
pMainWnd->SetWindowPos(&wndNoTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
pWndInsertAfter = &wndTopMost;
SetWindowPos(pWndInsertAfter,0,0,GetSystemMetrics(SM_CXSCREEN),GetSystemMetrics(SM_CYSCREEN),
SWP_NOSIZE | SWP_NOMOVE); //置于最顶端