⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 screendlg.cpp

📁 evc实现全屏源码
💻 CPP
字号:
// screenDlg.cpp : implementation file
//

#include "stdafx.h"
#include "screen.h"
#include "screenDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CScreenDlg dialog

CScreenDlg::CScreenDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CScreenDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CScreenDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CScreenDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CScreenDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CScreenDlg, CDialog)
	//{{AFX_MSG_MAP(CScreenDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CScreenDlg message handlers

BOOL CScreenDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	

	int   cx,   cy;     
          HDC   dc   =   ::GetDC(NULL);     
          cx   =   GetDeviceCaps(dc,HORZRES)   +     
                  GetSystemMetrics(SM_CXBORDER);     
          cy   =   GetDeviceCaps(dc,VERTRES)   +   
                  GetSystemMetrics(SM_CYBORDER);     
          ::ReleaseDC(0,dc);     
    
          //去除标题和边框   
          SetWindowLong(m_hWnd,   GWL_STYLE,     
                  GetWindowLong(m_hWnd,   GWL_STYLE)   &     
          (~(WS_CAPTION   |   WS_BORDER)));     
    
          //   置对话框为最顶端并扩充到整个屏幕   
          ::SetWindowPos(m_hWnd,   HWND_TOPMOST,     
                  -(GetSystemMetrics(SM_CXBORDER)+1),     
                  -(GetSystemMetrics(SM_CYBORDER)+1),     
                  cx+1,cy+1,   SWP_NOZORDER);     
    
          //隐藏任务栏
		  HWND hTaskBar;
		  hTaskBar = ::FindWindow(TEXT("HHTaskBar"), NULL);  //搜寻任务栏句柄 
		  ::ShowWindow(hTaskBar, SW_HIDE); //隐藏

		  // ShowWindow(hTaskBar, SW_SHOWNORMAL); //显示任务栏


	CenterWindow(GetDesktopWindow());	// center to the hpc screen

	// TODO: Add extra initialization here
	return TRUE;  // return TRUE  unless you set the focus to a control
}



LRESULT CScreenDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
{
	// TODO: Add your specialized code here and/or call the base class
		HDC hdc;
	int wmId, wmEvent;
	PAINTSTRUCT ps;


	return CDialog::WindowProc(message, wParam, lParam);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -