vc对话框全屏

void CDlg::FullScreen()

{

ModifyStyle(WS_CAPTION,0,0);

int frameWidth =  GetSystemMetrics(SM_CXFRAME);

int frameHeight = GetSystemMetrics(SM_CYFRAME);

int captionHeight = GetSystemMetrics(SM_CYCAPTION);

int screenWidth = GetSystemMetrics(SM_CXSCREEN);

int screenHeight = GetSystemMetrics(SM_CYSCREEN);

CRect rect;

GetClientRect(&rect);

rect.left = rect.left – frameWidth;

rect.top = rect.top – frameHeight – captionHeight ;

rect.bottom = rect.top + screenHeight + 2 * frameHeight + captionHeight;

rect.right = rect.left + screenWidth + 2 * frameWidth;

ShowWindow(SW_HIDE);

SetWindowPos(&wndTopMost, 0, 0, rect.Width(), rect.Height(), SWP_SHOWWINDOW);

}

    原文作者:chinabinlang
    原文地址: https://blog.csdn.net/chinabinlang/article/details/47729255
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞