zddesk.cpp ( 文件浏览 )
文件源自:
虚拟桌面
- keepall 发布于 2016-08-28 09:36
- 浏览次数:328
- 下载次数: 2
- 下载需 10 积分
-
- 侵权举报
/* File: zddesk.cpp - Implementation of main CWinApp object. Implements ZDDesk's main application object and also implements the about dialog box. Author: Steven E. Sipe */ #include "stdafx.h" #include "zddesk.h" #include "frame.h" #include "splash.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CZDDeskApp BEGIN_MESSAGE_MAP(CZDDeskApp, CWinApp) //{{AFX_MSG_MAP(CZDDeskApp) //}}AFX_MSG_MAP // Standard file based document commands ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CZDDeskApp construction // Constructor CZDDeskApp::CZDDeskApp() { } ///////////////////////////////////////////////////////////////////////////// // App object // The one and only application object CZDDeskApp theApp; // Determine if we are running the new shell (i.e. Windows 95 or Windows NT 4.0 // or later) BOOL CZDDeskApp::HasNewShell() { // Get the Windows Version DWORD dwVersion = GetVersion(); // Windows NT? if(dwVersion < 0x80000000) { // Yes, Windows NT 4.0 or greater? if (LOBYTE(LOWORD(dwVersion)) >= 4) return TRUE; } // Windows 95? else if(LOBYTE(LOWORD(dwVersion)) >= 4) return TRUE; return FALSE; // Win16, 32s or NT3.x. } // Determine if ZDDesk is already running by using a Mutex object -- returns // TRUE if already running, FALSE otherwise. Note that a mutex is created // with the name of the application BOOL CZDDeskApp::AlreadyRunning() { BOOL bFound = FALSE; // Try to create a mutex with the app's name HANDLE hMutexOneInstance = ::CreateMutex(NULL,TRUE,_T(AfxGetAppName())); // Already there...means that we are already running an instance if(::GetLastError() == ERROR_ALREADY_EXISTS) bFound = TRUE; // Release the mutex if(hMutexOneInstance) ::ReleaseMutex(hMutexOneInstance); return(bFound); } ///////////////////////////////////////////////////////////////////////////// // CZDDeskApp initialization // Performs instance initialization for the application BOOL CZDDeskApp::InitInstance() { // Command line info -- used by the splash screen CCommandLineInfo cmdInfo; ParseCommandLine(cmdInfo); // Only allow one instance of our application to execute if(AlreadyRunning()) { AfxMessageBox(IDS_ALREADY_RUNNING,MB_OK|MB_ICONWARNING); return(FALSE); } // Only run with the new shell --- we need a system tray if(!HasNewShell()) { AfxMessageBox(IDS_WRONG_SHELL,MB_OK|MB_ICONSTOP); return(FALSE); } // Setup the splash screen CSplashWnd::EnableSplashScreen(cmdInfo.m_bShowSplash); // [!==More==!]
...
展开> <收缩
Sponsored links
源码文件列表
温馨提示: 点击源码文件名可预览文件内容哦 ^_^名称 | 大小 | 修改日期 |
---|---|---|
/registry.cpp | 3.17 KB | 1997-06-30 21:14:32 |
/property.cpp | 4.19 KB | 1997-06-30 21:14:32 |
/arrange.cpp | 11.46 KB | 1997-06-30 21:14:32 |
/zddesk.dsp | 6.86 KB | 1997-05-29 09:39:32 |
/zddesk.aps | 71.35 KB | 1997-06-30 21:24:34 |
/zddesk.rc | 10.53 KB | 1997-06-30 21:24:34 |
/resource.h | 3.14 KB | 1997-06-30 21:14:36 |
/frame.h | 4.61 KB | 1997-06-30 21:14:36 |
/arrange.h | 2.16 KB | 1997-06-30 21:14:36 |
/tray.h | 1.20 KB | 1997-06-30 21:14:36 |
/registry.h | 913 Bytes | 1997-06-30 21:14:36 |
/property.h | 1.32 KB | 1997-06-30 21:14:36 |
/zddesk.mak | 9.55 KB | 1997-06-11 23:49:46 |
/zddesk.mdp | 36.00 KB | 1997-06-25 22:26:02 |
/zddesk.clw | 3.26 KB | 1997-06-30 21:21:12 |
/zddesk.dsw | 535 Bytes | 1997-05-12 20:15:20 |
/zddesk.plg | 1.65 KB | 1997-06-02 09:38:16 |
/splash.h | 1.17 KB | 1997-06-30 21:14:36 |
/debug/ | 0 Bytes | 1997-05-26 17:03:26 |
/release/ | 0 Bytes | 1997-05-26 17:03:26 |
/res/ | 0 Bytes | 1997-05-26 17:03:26 |
/stdafx.h | 471 Bytes | 1997-06-30 21:14:36 |
/splash.cpp | 3.30 KB | 1997-06-30 21:14:32 |
/stdafx.cpp | 208 Bytes | 1997-06-30 21:14:32 |
/tray.cpp | 2.60 KB | 1997-06-30 21:14:32 |
/frame.cpp | 20.43 KB | 1997-06-30 21:14:32 |
/zddesk.h | 2.08 KB | 1997-06-30 21:14:36 |
/zddesk.cpp | 5.66 KB | 1997-06-30 21:14:32 |
/res/zddesk5.ico | 1.05 KB | 1997-05-02 22:48:26 |
/res/zddesk4.ico | 1.05 KB | 1997-05-02 22:56:50 |
/res/zddesk3.ico | 1.05 KB | 1997-05-02 22:43:30 |
/res/zddesk2.ico | 1.05 KB | 1997-05-02 22:56:50 |
/res/zddesk1.ico | 1.05 KB | 1997-05-02 22:56:50 |
/res/zddesk9.ico | 1.05 KB | 1997-05-02 22:55:12 |
/res/zddesk8.ico | 1.05 KB | 1997-05-02 22:53:34 |
/res/zddesk7.ico | 1.05 KB | 1997-05-02 22:51:36 |
/res/zddesk6.ico | 1.05 KB | 1997-05-02 22:49:50 |
/res/zddesk.ico | 1.05 KB | 1997-06-11 23:36:14 |
/res/list.bmp | 358 Bytes | 1997-05-01 00:39:54 |
/res/splsh16.bmp | 18.09 KB | 1997-06-30 21:24:34 |
/res/zddesk.rc2 | 397 Bytes | 1997-01-30 11:35:14 |
/res/nodrop.cur | 326 Bytes | 1997-05-02 22:00:26 |
/res/drop.cur | 326 Bytes | 1997-05-02 22:00:26 |
Sponsored links