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

📄 traytest.cpp

📁 托盘程序示例
💻 CPP
字号:
#include "stdafx.h"
#include "traytest.h"
#include "MainFrm.h"

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

BEGIN_MESSAGE_MAP(CTrayApp, CWinApp)
	//{{AFX_MSG_MAP(CTrayApp)
	ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

CTrayApp::CTrayApp()
{
  bDisplayingAboutBox = FALSE;
}

CTrayApp theApp;

BOOL CTrayApp::InitInstance()
{
	Enable3dControls();

  CMainFrame* pMainFrame = new CMainFrame;
  m_pMainWnd = pMainFrame;
  if (!pMainFrame->Create(NULL, _T("Traytest")))
    return FALSE;

  m_pMainWnd->ShowWindow(SW_HIDE);
  m_pMainWnd->UpdateWindow();
  OnAppAbout();

	return TRUE;
}


void CTrayApp::OnAppAbout()
{
  //avoid bringing up two versions of the dialog
  if (bDisplayingAboutBox)
    return;

  bDisplayingAboutBox = TRUE;
	CDialog(IDD_ABOUTBOX).DoModal();
  bDisplayingAboutBox = FALSE;
}

⌨️ 快捷键说明

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