forked from AlloyTeam/webtop
-
Notifications
You must be signed in to change notification settings - Fork 1
/
system.h
37 lines (36 loc) · 1.41 KB
/
system.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef __SYSTEM_H__
#define __SYSTEM_H__
#include <Windows.h>
#include <xstring>
#include <CommDlg.h>
#include <comdef.h>
#include "myutil.h"
#include <GdiPlus.h>
using namespace Gdiplus;
using namespace std;
wstring GetExtW(wstring path);
string GetExt(string path);
BOOL EnableShutdownPrivilege();
BOOL Shutdown(BOOL bForce);
BOOL Logoff(BOOL bForce);
BOOL Reboot(BOOL bForce);
BOOL SaveFileDialog(HWND hWnd, const TCHAR* fileNameStr, TCHAR* szFile);
BOOL OpenFileDialog(HWND hWnd, const TCHAR* fileNameStr, TCHAR* szFile);
BOOL OpenMultiFilesDialog(HWND hWnd, const TCHAR* fileNameStr, TCHAR* szFile);
int CDECL MessageBoxPrintf (TCHAR * szCaption, TCHAR * szFormat, ...);
BOOL ModifyStyle(
HWND hWnd,
_In_ DWORD dwRemove,
_In_ DWORD dwAdd,
_In_ UINT nFlags = 0);
void SetDefaultBrowser(const TCHAR *strAppName);
BOOL CheckFileRelation(const TCHAR *strExt, const TCHAR *strAppKey, TCHAR *strAppName, TCHAR *strDefaultIcon, TCHAR *strDescribe);
void RegisterFileRelation(TCHAR *strExt, TCHAR *strAppName, TCHAR *strAppKey, TCHAR *strDefaultIcon, TCHAR *strDescribe);
wstring find(wstring path,bool cursive=false);
Bitmap* GetImageFromBase64(string encodedImage);
int GetEncoderClsid(const WCHAR* format, CLSID* pClsid);
void SaveBitmap(Bitmap* pbm, wstring path);
void GetFolder (HWND hWnd, TCHAR* szSelFolder);
long GetFileSize(const TCHAR* filename);
void ChangeFileSize(const TCHAR* filename,DWORD size);
#endif