网上说对于ocx
::SetParent(hWnd, GetDesktopWindow()); //hWnd 为你的窗体句柄。
int width = ::GetSystemMetrics(SM_CXSCREEN);
int height = ::GetSystemMetrics(SM_CYSCREEN);
::MoveWindow(hWnd, 0, 0, width, height, 0);
可以变成全屏
但我实际的代码如下:
::SetParent(this->m_hWnd, GetDesktopWindow()); //hWnd 为你的窗体句柄。
int width = ::GetSystemMetrics(SM_CXSCREEN);
int height = ::GetSystemMetrics(SM_CYSCREEN);
::MoveWindow(this->m_hWnd, 0, 0, width, height, 0);
在IE浏览器中没有变化,当然也没有全屏,不知错在哪?
::SetParent(hWnd, GetDesktopWindow()); //hWnd 为你的窗体句柄。
int width = ::GetSystemMetrics(SM_CXSCREEN);
int height = ::GetSystemMetrics(SM_CYSCREEN);
::MoveWindow(hWnd, 0, 0, width, height, 0);
可以变成全屏
但我实际的代码如下:
::SetParent(this->m_hWnd, GetDesktopWindow()); //hWnd 为你的窗体句柄。
int width = ::GetSystemMetrics(SM_CXSCREEN);
int height = ::GetSystemMetrics(SM_CYSCREEN);
::MoveWindow(this->m_hWnd, 0, 0, width, height, 0);
在IE浏览器中没有变化,当然也没有全屏,不知错在哪?
我用的这段代码,没问题啊