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

📄 tttdlg.cpp

📁 wince平台evc实现的全屏
💻 CPP
字号:
// tttDlg.cpp : implementation file
//

#include "stdafx.h"
#include "ttt.h"
#include "tttDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define MENU_HEIGHT 26
/////////////////////////////////////////////////////////////////////////////
// CTttDlg dialog

CTttDlg::CTttDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CTttDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CTttDlg)
		// 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 CTttDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CTttDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CTttDlg, CDialog)
	//{{AFX_MSG_MAP(CTttDlg)
	ON_EN_SETFOCUS(IDC_EDIT1, OnSetfocusEdit1)
	ON_EN_KILLFOCUS(IDC_EDIT1, OnKillfocusEdit1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTttDlg message handlers

BOOL CTttDlg::OnInitDialog()
{
	
	m_bFullScreen = FALSE;
	CDialog::OnInitDialog();
	
	// Call SHInitDialog with flags for full screen.
	SHINITDLGINFO shidi;
	
	shidi.dwMask = SHIDIM_FLAGS;
	shidi.dwFlags = SHIDIF_FULLSCREENNOMENUBAR;
	shidi.hDlg = m_hWnd;
	SHInitDialog(&shidi);
	
	// Set the icon for this dialog box. The framework does this automatically
	//  when the application's main window is not a dialog box.
	SetIcon(m_hIcon, TRUE);   // Set big icon.
	SetIcon(m_hIcon, FALSE);  // Set small icon.
	
	// TODO: Add extra initialization here.
	::CommandBar_Show(m_pWndEmptyCB->m_hWnd, FALSE);

	// SHFullScreen fails if dialog box is not foreground.
	SetForegroundWindow();
	SHFullScreen(m_hWnd, SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON|SHFS_HIDESTARTICON);
	
	// Resize the window over the taskbar area.
	nX = GetSystemMetrics(SM_CXSCREEN);
	nY = GetSystemMetrics(SM_CYSCREEN);


	MoveWindow(0,0,nX,nY, TRUE);

	return TRUE;  // return TRUE  unless you set the focus to a control
}



BOOL CTttDlg::OnCommand(WPARAM wParam, LPARAM lParam) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CDialog::OnCommand(wParam, lParam);
}

void CTttDlg::CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	CDialog::CalcWindowRect(lpClientRect, nAdjustType);
}

LRESULT CTttDlg::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CDialog::DefWindowProc(message, wParam, lParam);
}

LRESULT CTttDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
{
	return CDialog::WindowProc(message, wParam, lParam);
}



void CTttDlg::OnSetfocusEdit1() 
{
	BOOL re = SHSipPreference(m_hWnd, SIP_UP);

}


void CTttDlg::OnOK() 
{
	// TODO: Add extra validation here
	
	CDialog::OnOK();
}

void CTttDlg::OnKillfocusEdit1() 
{
	// TODO: Add your control notification handler code here
	SHSipPreference(m_hWnd, SIP_DOWN);
}

⌨️ 快捷键说明

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