📄 global.h
字号:
/////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2002 Ultr@VNC Team Members. All Rights Reserved.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
//
// If the source code for the program is not available from the place from
// which you received this file, check
// http://www.teamviewer.com/
//
////////////////////////////////////////////////////////////////////////////
#ifndef GLOBAL_H__
#define GLOBAL_H__
#pragma once
using namespace std;
enum ConnectionMode
{
Teamwork = 0,
Presentation,
RemoteControl,
Filetransfer
};
class vncServer;
/*
*/
bool GetSpecialFolderPath_unsecure(int nId, char* szPath);
/*
GetSpecialFolderPath returns a given path by its ID.
The ID you can find at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp
This function tries to impersonate the process into a logged on user. If the process is not
a server or is already impersonated as an user it does nothing.
@param(nID [in] contains the given folder ID)
@param(outPath [out] will get the ordered folder string as a STL::string)
@param(doImpersonate [in] If false the parameter doImpersonate forces the function not to impersonate;
otherwise impersonation is used (by default))
@return(Returns true if the folder could be retrieved and stored into parameter outPath; otherwise false. You can use GetLastError to get extended error information
In case of failure the parameter outPath contains an empty string.)
*/
bool GetSpecialFolderPath(int nId, string &outPath, bool doImpersonate = true);
void GetApplicationDirectory(string &sApplicationDirectory);
void GetApplicationPath(string &sApplicationPath);
bool FileExists(string sFileName);
bool RunningInSystemAccount();
std::string LoadString(int id);
string Localize(int id);
string IntegerToString(int i);
BOOL RemoveNonEmptyDirectory(_TCHAR *SDirName);
int gcd(int a, int b);
void AddDefaultScalings(HWND hwnd);
BOOL EraseBkgnd(HWND hwnd, WPARAM wParam);
BOOL CtlColorBtn(WPARAM wParam);
BOOL CtlColorStatic(HWND hwnd, WPARAM wParam, LPARAM lParam);
void MeasureItem(HWND hwnd, HMENU menu, LPARAM lParam);
void DrawItem(LPARAM lParam);
BOOL CALLBACK HelpTextProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
// how much to scale a design that assumes 96-DPI pixels
extern double scaleX;
extern double scaleY;
#define SCALEX(argX) ((int) ((argX) * scaleX))
#define SCALEY(argY) ((int) ((argY) * scaleY))
extern void InitScaling();
extern bool isQuickSupport;
extern bool isQSCustom;
extern bool isNoInstallation;
extern bool isNoSave;
extern bool isOutgoingConnection;
extern int ViewerAppCounter;
extern bool DisableCaptureBlt;
extern unsigned int lastMouseMove;
// Typing "demo" in the address field opens presentation mode on localhost with reduced size 50%
// This allow easy trying of the "TeamViewer idea"
extern bool DemoPresentation;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -