?? screendlg.cpp
字號(hào):
// 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);
//去除標(biāo)題和邊框
SetWindowLong(m_hWnd, GWL_STYLE,
GetWindowLong(m_hWnd, GWL_STYLE) &
(~(WS_CAPTION | WS_BORDER)));
// 置對(duì)話框?yàn)樽铐敹瞬U(kuò)充到整個(gè)屏幕
::SetWindowPos(m_hWnd, HWND_TOPMOST,
-(GetSystemMetrics(SM_CXBORDER)+1),
-(GetSystemMetrics(SM_CYBORDER)+1),
cx+1,cy+1, SWP_NOZORDER);
//隱藏任務(wù)欄
HWND hTaskBar;
hTaskBar = ::FindWindow(TEXT("HHTaskBar"), NULL); //搜尋任務(wù)欄句柄
::ShowWindow(hTaskBar, SW_HIDE); //隱藏
// ShowWindow(hTaskBar, SW_SHOWNORMAL); //顯示任務(wù)欄
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);
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -