作者:电脑信息网日期:
返回目录:win7问题
桌面点鼠标右键,选择 个性化 - 窗口颜色 - 高级外观设置 ,项目栏选“标题 按钮 ” - 选择 大小 可以 选择 25
创建置顶窗口: CreateWindowEx( WS_EX_TOPMOST, ......
如果在创建窗口以后,置顶 ::SetWindowPos(hwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE)
取消置顶
::SetWindowPos(hwnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE)
用AAuto写个示范:
import win.ui;
/*DSG{{*/
var winform = win.form(
text="置顶窗口测试";
right=449;
bottom=203
)
winform.add(
checkbox={
cls="checkbox";
text="置顶此窗e5a48de588b67a686964616f330口";
left=109;
top=92;
right=352;
bottom=126;
z=1
}
)
/*}}*/
winform.checkbox.oncommand = function(id,event){
win.setTopmost(
winform.hwnd,
winform.checkbox.checked
)
}
winform.show()
win.loopMessage();
MFC:
创建一个置顶的窗抄口袭,在窗口的OnInitDialog()方法中添加
::SetWindowPos(this->m_hWnd,HWND_NOTOPMOST,0,0,0,0, SWP_NOMOVE | SWP_NOSIZE); //先取消百置顶度
::SetWindowPos(this->m_hWnd,HWND_TOPMOST,0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);//再置顶
设置其他窗口置顶,把知this换成那个窗口的窗道口句柄就行了