zoukankan      html  css  js  c++  java
  • MFC ACTIVEX 全屏

    HWND m_hWndParent;
    BOOL m_fullscreen;
    void CDialog::SwitchFullScreen(void)
    {
        LONG style = ::GetWindowLong(this->m_hWnd, GWL_STYLE);
        if (m_fullscreen == false)
        {
            //隐藏系统任务栏
            CWnd * wnd = FindWindow("Shell_TrayWnd",NULL);
            wnd->SetWindowPos(NULL, 0000, SWP_HIDEWINDOW);
            m_hWndParent = ::GetParent(m_hWnd);
            ::ShowWindow(m_hWndParent, SW_HIDE);
            ::SetParent(m_hWnd, NULL);
            style &= ~(WS_DLGFRAME | WS_THICKFRAME);
            SetWindowLong(this->m_hWnd,GWL_STYLE, style);
            this->ShowWindow(SW_SHOWMAXIMIZED);
            int cx = ::GetSystemMetrics(SM_CXSCREEN);
            int cy = ::GetSystemMetrics(SM_CYSCREEN);
            MoveWindow(00, cx, cy, TRUE);
        }
        else
        {
            //显示系统任务栏
            CWnd * wnd = FindWindow("Shell_TrayWnd",NULL);
            wnd->SetWindowPos(NULL,0,0,0,0,SWP_SHOWWINDOW);
            style |= WS_DLGFRAME | WS_THICKFRAME;
            SetWindowLong(this->m_hWnd, GWL_STYLE, style);
            ::SetParent(m_hWnd, m_hWndParent);
            ::ShowWindow(m_hWndParent, SW_SHOW);
        }
        m_fullscreen = !m_fullscreen;
    }
  • 相关阅读:
    Nginx优化
    Mysql日常操作
    YUM源
    MySQL5.7安装手册
    自律——可以让我们活的更高级
    javascript中with的用法
    js中所有函数的参数(按值和按引用)都是按值传递的,怎么理解?
    base64编码的图片在网页中显示
    form表单提交没有跨域问题,但ajax提交存在跨域问题
    移动端1px的适配问题
  • 原文地址:https://www.cnblogs.com/whisht/p/2319682.html
Copyright © 2011-2022 走看看