3 * @file main-win-utils.h
4 * @brief Windows版固有実装(ユーティリティー)ヘッダ
7 #include "term/z-virt.h"
12 * @brief マルチバイト文字列(CP932)をワイド文字列へ変換するクラス
16 to_wchar(const char *src)
23 int size = ::MultiByteToWideChar(932, 0, src, -1, buf, 0);
26 C_MAKE(buf, buf_size, WCHAR);
27 if (::MultiByteToWideChar(932, 0, src, -1, buf, buf_size) == 0) {
39 to_wchar(const to_wchar &) = delete;
40 to_wchar &operator=(const to_wchar &) = delete;
54 C_KILL(buf, buf_size, WCHAR);
62 * @brief ワイド文字列をマルチバイト文字列(CP932)へ変換するクラス
66 to_multibyte(const WCHAR *src)
73 int size = ::WideCharToMultiByte(932, 0, src, -1, buf, 0, NULL, NULL);
76 C_MAKE(buf, buf_size, char);
77 if (::WideCharToMultiByte(932, 0, src, -1, buf, buf_size, NULL, NULL) == 0) {
84 virtual ~to_multibyte()
89 to_multibyte(const to_multibyte &) = delete;
90 char* &operator=(const char* &) = delete;
104 C_KILL(buf, buf_size, char);
110 bool is_already_running(void);
111 void save_screen_as_html(HWND hWnd);
112 void open_dir_in_explorer(char* filename);
113 bool get_open_filename(OPENFILENAMEW *ofn, concptr dirname, char *filename, DWORD max_name_size);