-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwronginfo.cpp
More file actions
49 lines (41 loc) · 1.37 KB
/
wronginfo.cpp
File metadata and controls
49 lines (41 loc) · 1.37 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
/*
537 USB Disk Manager
Version 1.0 Beta
wronginfo.cpp
Copyright (C) 537 Studio. 2024. All rights reserved.
*/
#include "include/wronginfo.h"
#include <windows.h>
#include <iostream>
#include <cstring>
#include <string>
#include <cwchar>
#include "include/graphics.h"
void get_system_info_failed(){
std::wcout<<L"Show \"get system info failed\" MessageBoxW\n";
MessageBoxW(getHWnd(),L"Failed to obtain the necessary system information.\n\nPlease check your system environment or contact 537 Studio for assistance.",L"Get necessary system info failed.",MB_OK+16);
exit(-1);
}
void file_lost(int FILETYPE,std::wstring filename){
std::wcout<<L"Show \"file load failed\" MessageBoxW\n";
wchar_t content[MAX_PATH]=L"Wrong info: ";
wchar_t addcontent[]=L" loaded failed. \n\nPlease reinstall the 537 USB Disk Manager or contact a professional for help from the relevant personnel of 537 Studio.";
wchar_t filename_c[filename.length()];
wcscpy(filename_c,filename.data());
wcscat(content,filename_c);
wcscat(content,addcontent);
switch(FILETYPE){
case INFO_IMAGE:
MessageBoxW(getHWnd(),content,L"Load the image file failed.",MB_OK+16);
exit(-1);
break;
case INFO_MEDIA:
MessageBoxW(getHWnd(),content,L"Load the media file failed.",MB_OK+16);
exit(-1);
break;
default:
MessageBoxW(getHWnd(),content,L"Load the file failed.",MB_OK+16);
exit(-1);
break;
}
}