在已经打开记事本等待输入法按钮的情况下。 最后面隐藏输入法栏可有可无,要是加需要释放。
BOOL CxxxxxDLG::OnInitDialog()
{
SetForegroundWindow(); //此函数不调用,则SHFullScreen将无效
SHFullScreen(m_hWnd, SHFS_HIDESTARTICON| SHFS_HIDESIPBUTTON);
RECT rc;
SetRect(&rc, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
::MoveWindow(m_hWnd, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, TRUE);
this->m_bFullScreen = false; //不执行此句将有不同的效果
/* int cx, cy;
HDC dc = ::GetDC(NULL);
cx = GetDeviceCaps(dc,HORZRES)+GetSystemMetrics(SM_CXBORDER);
cy = GetDeviceCaps(dc,VERTRES)+GetSystemMetrics(SM_CYBORDER);
::ReleaseDC(0,dc);
//去除标题和边框
SetWindowLong(m_hWnd,GWL_STYLE,GetWindowLong(m_hWnd,GWL_STYLE)&(~(WS_CAPTION|WS_BORDER)));
// 置对话框为最顶端并扩充到整个屏幕
::SetWindowPos(m_hWnd,HWND_TOPMOST,-(GetSystemMetrics(SM_CXBORDER)+1),-(GetSystemMetrics(SM_CYBORDER)+1),cx+1,cy+1,SWP_NOZORDER);
*/
CDialog::OnInitDialog();
SetWindowText(_T(""));
// 隐藏输入法栏
CWnd* pWndSIP = FindWindow( _T("menu_worker"), NULL );
if ( pWndSIP )
{
pWndSIP->ShowWindow(SW_HIDE);
}
return TRUE;
}
本文来自优快云博客,转载请标明出处:http://blog.youkuaiyun.com/lxmhuendan/archive/2009/02/07/3867320.aspx