📄 subject_17106.htm
字号:
<p>
序号:17106 发表者:bigbox 发表日期:2002-10-08 15:19:17
<br>主题:请问vc中如何实现象windows taskbar一样的自动隐藏/探出窗口?我记得
<br>内容:我记得只要设一个窗口的属性就可以了?
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:iwill 回复日期:2002-10-08 15:47:35
<br>内容:开个定时器定时监测鼠标/边界.再用SetWinodwPos搞定它
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:徐景周 回复日期:2002-10-08 16:01:05
<br>内容:可参看下面方法,加强一下:<BR>BOOL AdjustPos(CRect* lpRect)<BR>{//自动靠边<BR> int iSX=GetSystemMetrics(SM_CXFULLSCREEN);<BR> int iSY=GetSystemMetrics(SM_CYFULLSCREEN);<BR> RECT rWorkArea;<BR> BOOL bResult = SystemParametersInfo(SPI_GETWORKAREA, <BR> sizeof(RECT),<BR> &rWorkArea,<BR> 0); <BR> CRect rcWA;<BR> if(!bResult)<BR> {//如果调用不成功就利用GetSystemMetrics获取屏幕面积<BR> rcWA=CRect(0,0,iSX,iSY);<BR> }<BR> else<BR> rcWA=rWorkArea;<BR> <BR> int iX=lpRect->left;<BR> int iY=lpRect->top;<BR> <BR> if(iX < rcWA.left + DETASTEP && iX!=rcWA.left)<BR> {//调整左<BR> //pWnd->SetWindowPos(NULL,rcWA.left,iY,0,0,SWP_NOSIZE);<BR> lpRect->OffsetRect(rcWA.left-iX,0);<BR> AdjustPos(lpRect);<BR> return TRUE;<BR> }<BR> if(iY < rcWA.top + DETASTEP && iY!=rcWA.top)<BR> {//调整上<BR> //pWnd->SetWindowPos(NULL ,iX,rcWA.top,0,0,SWP_NOSIZE);<BR> lpRect->OffsetRect(0,rcWA.top-iY);<BR> AdjustPos(lpRect);<BR> return TRUE;<BR> }<BR> if(iX + lpRect->Width() > rcWA.right - DETASTEP && iX !=rcWA.right-lpRect->Width())<BR> {//调整右<BR> //pWnd->SetWindowPos(NULL ,rcWA.right-rcW.Width(),iY,0,0,SWP_NOSIZE);<BR> lpRect->OffsetRect(rcWA.right-lpRect->right,0);<BR> AdjustPos(lpRect);<BR> return TRUE;<BR> }<BR> if(iY + lpRect->Height() > rcWA.bottom - DETASTEP && iY !=rcWA.bottom-lpRect->Height())<BR> {//调整下<BR> //pWnd->SetWindowPos(NULL ,iX,rcWA.bottom-rcW.Height(),0,0,SWP_NOSIZE);<BR> lpRect->OffsetRect(0,rcWA.bottom-lpRect->bottom);<BR> return TRUE;<BR> }<BR> return FALSE;<BR>}
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:徐景周 回复日期:2002-10-08 16:01:52
<br>内容:下面也有源码
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:徐景周 回复日期:2002-10-09 15:24:19
<br>内容:试试下面源码,已送到你邮箱。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -