求一个能全屏对话框的方法
程序一开始就需要全屏显示,所以不用管里面控件位置的变化,百度上的方法我基本上用过了,但都不行,只能来CSDN找安慰了,明早来给分……
------解决方案--------------------m_hWndParent = GetParent()->m_hWnd;
HWND hWndParent = m_hWndParent;
m_hWndTopParent = m_hWndParent;
while ((hWndParent = ::GetParent(hWndParent)))
{
m_hWndTopParent = hWndParent;
}
::ShowWindow(m_hWndTopParent, SW_HIDE);
CRect rt;
GetClientRect(&rt);
m_nOldCtrlWidth = rt.Width();
m_nOldCtrlHeight = rt.Height();
ModifyStyle(WS_CHILD, WS_OVERLAPPED);
SetParent(NULL);
------解决方案--------------------CE里面要全屏,用
SHFullScreen(this->m_hWnd,SHFS_HIDETASKBAR
------解决方案--------------------SHFS_HIDESTARTICON
------解决方案--------------------SHFS_HIDESIPBUTTON);
//SHFullScreen(this->m_hWnd,SHFS_HIDETASKBAR
------解决方案--------------------SHFS_HIDESTARTICON
------解决方案--------------------SHFS_HIDESIPBUTTON);
::ShowWindow(SHFindMenuBar(this->m_hWnd),SW_HIDE);
::ShowWindow(SHFindMenuBar(this->m_hWnd),SW_HIDE);
//全屏最大化,不可移动
ModifyStyleEx(0, WS_EX_NODRAG);
int iFullWidth = GetSystemMetrics(SM_CXSCREEN);
int iFullHeight = GetSystemMetrics(SM_CYSCREEN);
::SetWindowPos(this->m_hWnd, HWND_TOPMOST, 0, 0, iFullWidth, iFullHeight, SWP_NOOWNERZORDER
------解决方案--------------------SWP_SHOWWINDOW);
就可以了,我都是这么搞的
------解决方案--------------------试试
SetParent(hWnd, NULL);
ModifyStyle(hWnd, WS_CHILD, WS_POPUP);
MoveWindow(hWnd, 0, 0, nScreenWidth, nScreenHeight);
HWND hWndTray = ::FindWindow(_T("Shell_TrayWnd"), NULL);
if(hWndTray != NULL)
{
::ShowWindow(hWndTray, SW_HIDE);
}