微软的DSOFramer控件本身没有全屏功能,我实现了全屏功能,但是有个问题,在C/S模式下调用的时候很完美,在IE下调用有问题,情况是全屏后压缩到左上方,大小和IE当前大小一致,应该是IE拦截了控件的消息,看谁又办法解决呢?已经郁闷了好几天了!
解决方案 »
- Socket, 可以连接和发送,就是没有内容!
- 如何查看ADO中_ConnectionPtr,_CommandPtr,_RecordsetPtr这三个类的所有操作函数?
- 网络安全问题
- realSDK开发不得要领 请高手指点 不胜感谢
- 有没有pdg文件转其他格式的工具?
- 没有人会吗?
- 怎么在NT/2K/XP下直接读写硬盘任意扇区?DeviceIOControl似乎不行。
- win98 支持 240GB 硬盘吗?
- 请问哪里有CIH源码下载?谢谢!
- 如何得到控件对象的指针(已知它的窗口句柄和该控件的ID)
- 谁有办法保留VC6的IDE界面,但是用VS2010等更新的库和编译器写代码
- 请问,怎么在VC中禁止程序中的其他函数对注册表的某项键值进行修改
void CDsoFramerControl::SetFullScreen()
{
m_isSetFullScreen=FALSE;
if (!this->m_IsFull)
{
m_parent_hwnd=GetParent(m_hwnd);
m_hwnd_ie=GetIEHwnd(m_hwnd);
GetWindowRect(m_hwnd,&m_last_rect);
GetWindowRect(m_parent_hwnd,&m_parent_rect);
RECT rectDesktop,ierect;
::GetWindowRect ( m_hwnd_ie, &ierect );
::GetWindowRect ( ::GetDesktopWindow(), &rectDesktop );
int cx = rectDesktop.right;
int cy = rectDesktop.bottom;
m_Size.cx=rectDesktop.right;
m_Size.cy=rectDesktop.bottom;
SetWindowText(m_hwnd_full_btn,"返回");
HRGN rgn=CreateRectRgn(0,0,cx,cy);
SetWindowRgn(m_hwnd,rgn,0);
::SetParent(m_hwnd,::GetDesktopWindow());
::SetWindowPos(this->m_hwnd,HWND_TOPMOST,
0,-24,cx,cy,
SWP_ASYNCWINDOWPOS|SWP_NOCOPYBITS);
::MoveWindow(this->m_hwnd,
0,-24,cx,cy,
0);
m_IsFull=TRUE;
}
else
{
SetParent(m_hwnd,m_parent_hwnd);
int cx = m_last_rect.right-m_last_rect.left;
int cy = m_last_rect.bottom-m_last_rect.top;
m_Size.cx=cx;
m_Size.cy=cy;
::MoveWindow(this->m_hwnd, m_last_rect.left-m_parent_rect.left,m_last_rect.top-m_parent_rect.top,
cx,cy, 0);//this->
::SetWindowPos(this->m_hwnd,HWND_TOPMOST,
m_last_rect.left-m_parent_rect.left,m_last_rect.top-m_parent_rect.top,cx,cy,
SWP_ASYNCWINDOWPOS|SWP_NOCOPYBITS);
SetWindowText(m_hwnd_full_btn,"全屏");
}