?? tttdlg.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 + -