分享

wince 下的各种全屏方法

 冰剑穿心 2019-12-11

wince 下的APP全屏,写在这里避免以后自己忘了到处乱找。。。

简单粗暴的全屏(无标题栏,无任务栏)

  1. int nFullWidth = GetSystemMetrics(SM_CXSCREEN);

  2. int nFullHeight = GetSystemMetrics(SM_CYSCREEN);

  3. ::SetWindowPos(hWnd,HWND_TOPMOST,0,0,nFullWidth,nFullHeight,WS_EX_TOPMOST);

全屏有任务栏

  1. CRect m_FullScreenRect;

  2. int nFullWidth=GetSystemMetrics(SM_CXSCREEN);

  3. int nFullHeight=GetSystemMetrics(SM_CYSCREEN);

  4. m_FullScreenRect.left = 0;

  5. m_FullScreenRect.top = 0;

  6. m_FullScreenRect.right = m_FullScreenRect.left + nFullWidth;

  7. m_FullScreenRect.bottom = m_FullScreenRect.top + nFullHeight;

  8. MoveWindow(0,0,m_FullScreenRect.Width(),m_FullScreenRect.Height(),1);

去掉标题栏和光标

  1. ModifyStyle(WS_CAPTION, NULL, SWP_DRAWFRAME );

  2. ShowCursor(FALSE);

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多