diff --git a/Source/Project64-input/wtl-ScanButton.cpp b/Source/Project64-input/wtl-ScanButton.cpp index 5deb5f6bb..524088224 100644 --- a/Source/Project64-input/wtl-ScanButton.cpp +++ b/Source/Project64-input/wtl-ScanButton.cpp @@ -20,7 +20,7 @@ void CScanButton::SubclassWindow(CWindow Wnd) m_DisplayCtrl = Wnd.GetDlgItem(m_DisplayCtrlId); m_ScanBtn = Wnd.GetDlgItem(m_ScanBtnId); m_ScanBtnThunk.Init((WNDPROC)ScanButtonProc, this); - m_ScanBtnProc = (WNDPROC)m_ScanBtn.SetWindowLongPtrW(GWLP_WNDPROC, (LONG_PTR)m_ScanBtnThunk.GetWNDPROC()); + m_ScanBtnProc = (WNDPROC)m_ScanBtn.SetWindowLongPtr(GWLP_WNDPROC, (LONG_PTR)m_ScanBtnThunk.GetWNDPROC()); DisplayButton(); } diff --git a/Source/Project64/UserInterface/CheatClassUI.cpp b/Source/Project64/UserInterface/CheatClassUI.cpp index 8bdf5b15f..4928dad65 100644 --- a/Source/Project64/UserInterface/CheatClassUI.cpp +++ b/Source/Project64/UserInterface/CheatClassUI.cpp @@ -590,7 +590,7 @@ void CCheatList::MenuSetText(HMENU hMenu, int MenuPos, const wchar_t * Title, co return; } - MENUITEMINFOW MenuInfo = { 0 }; + MENUITEMINFO MenuInfo = { 0 }; wchar_t String[256]; MenuInfo.cbSize = sizeof(MENUITEMINFO); MenuInfo.fMask = MIIM_TYPE; @@ -599,11 +599,11 @@ void CCheatList::MenuSetText(HMENU hMenu, int MenuPos, const wchar_t * Title, co MenuInfo.dwTypeData = String; MenuInfo.cch = 256; - GetMenuItemInfoW(hMenu, MenuPos, true, &MenuInfo); + GetMenuItemInfo(hMenu, MenuPos, true, &MenuInfo); wcscpy(String, Title); if (wcschr(String, '\t') != NULL) { *(wcschr(String, '\t')) = '\0'; } if (ShortCut) { _swprintf(String, L"%s\t%s", String, ShortCut); } - SetMenuItemInfoW(hMenu, MenuPos, true, &MenuInfo); + SetMenuItemInfo(hMenu, MenuPos, true, &MenuInfo); } CEditCheat::CEditCheat(CEnhancementList & Cheats, CCheatList & CheatList) : @@ -670,7 +670,7 @@ LRESULT CEditCheat::OnEditCheat(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, } GetDlgItem(IDC_CHEAT_OPTIONS).SetWindowText(Buffer.ToUTF16().c_str()); GetDlgItem(IDC_NOTES).SetWindowText(stdstr(m_EditEnhancement->GetNote()).ToUTF16().c_str()); - GetDlgItem(IDC_ADD).SetWindowTextW(wGS(CHEAT_EDITCHEAT_UPDATE).c_str()); + GetDlgItem(IDC_ADD).SetWindowText(wGS(CHEAT_EDITCHEAT_UPDATE).c_str()); SendMessage(WM_COMMAND, MAKELPARAM(IDC_CHEAT_CODES, EN_CHANGE), (LPARAM)(HWND)GetDlgItem(IDC_CHEAT_CODES)); RecordCurrentValues(); diff --git a/Source/Project64/UserInterface/MainMenu.cpp b/Source/Project64/UserInterface/MainMenu.cpp index f10e09a51..bd0be8782 100644 --- a/Source/Project64/UserInterface/MainMenu.cpp +++ b/Source/Project64/UserInterface/MainMenu.cpp @@ -607,7 +607,7 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI } if (MenuID >= ID_LANG_START && MenuID < ID_LANG_END) { - MENUITEMINFOW menuinfo; + MENUITEMINFO menuinfo; wchar_t String[300]; menuinfo.cbSize = sizeof(MENUITEMINFO); @@ -615,7 +615,7 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI menuinfo.fType = MFT_STRING; menuinfo.dwTypeData = String; menuinfo.cch = sizeof(String); - GetMenuItemInfoW((HMENU)m_MenuHandle, MenuID, FALSE, &menuinfo); + GetMenuItemInfo((HMENU)m_MenuHandle, MenuID, FALSE, &menuinfo); g_Lang->SetLanguage(stdstr().FromUTF16(String).c_str()); m_Gui->ResetRomBrowserColomuns(); diff --git a/Source/Project64/UserInterface/MainWindow.cpp b/Source/Project64/UserInterface/MainWindow.cpp index 20d8e3d48..fcb1cda91 100644 --- a/Source/Project64/UserInterface/MainWindow.cpp +++ b/Source/Project64/UserInterface/MainWindow.cpp @@ -366,13 +366,13 @@ void CMainGui::MakeWindowOnTop(bool OnTop) void CMainGui::Caption(LPCWSTR Caption) { CGuard Guard(m_CS); - SetWindowTextW(m_hMainWindow, Caption); + SetWindowText(m_hMainWindow, Caption); } void CMainGui::Create(const char * WindowTitle) { stdstr_f VersionDisplay("Project64 %s", VER_FILE_VERSION_STR); - m_hMainWindow = CreateWindowExW(WS_EX_ACCEPTFILES, VersionDisplay.ToUTF16().c_str(), stdstr(WindowTitle).ToUTF16().c_str(), WS_OVERLAPPED | WS_CLIPCHILDREN | + m_hMainWindow = CreateWindowEx(WS_EX_ACCEPTFILES, VersionDisplay.ToUTF16().c_str(), stdstr(WindowTitle).ToUTF16().c_str(), WS_OVERLAPPED | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_SYSMENU | WS_MINIMIZEBOX, 5, 5, 640, 480, NULL, NULL, GetModuleHandle(NULL), this); m_Created = m_hMainWindow != NULL; @@ -533,10 +533,10 @@ void CMainGui::SetStatusText(int Panel, const wchar_t * Text) Msg[(sizeof(Message[0]) / sizeof(Message[0][0])) - 1] = 0; if (GetCurrentThreadId() == m_ThreadId) { - SendMessageW((HWND)m_hStatusWnd, SB_SETTEXTW, Panel, (LPARAM)Msg); + SendMessage((HWND)m_hStatusWnd, SB_SETTEXT, Panel, (LPARAM)Msg); } else { - PostMessageW((HWND)m_hStatusWnd, SB_SETTEXTW, Panel, (LPARAM)Msg); + PostMessage((HWND)m_hStatusWnd, SB_SETTEXT, Panel, (LPARAM)Msg); } } diff --git a/Source/Project64/UserInterface/MenuClass.cpp b/Source/Project64/UserInterface/MenuClass.cpp index adfad2063..7797525c0 100644 --- a/Source/Project64/UserInterface/MenuClass.cpp +++ b/Source/Project64/UserInterface/MenuClass.cpp @@ -66,7 +66,7 @@ bool CBaseMenu::AddMenu(HMENU hMenu, MenuItemList Items) String += MenuItem->ShortCut(); Text = String; } - AppendMenuW(hMenu, uFlags, ItemID, Text.c_str()); + AppendMenu(hMenu, uFlags, ItemID, Text.c_str()); } return true; } \ No newline at end of file diff --git a/Source/Project64/UserInterface/Notification.cpp b/Source/Project64/UserInterface/Notification.cpp index 8a1fbca37..75ddabf93 100644 --- a/Source/Project64/UserInterface/Notification.cpp +++ b/Source/Project64/UserInterface/Notification.cpp @@ -56,7 +56,7 @@ void CNotificationImp::DisplayWarning(const char * Message) const { Parent = reinterpret_cast(m_hWnd->GetWindowHandle()); } - MessageBoxW(Parent, stdstr(Message).ToUTF16().c_str(), wGS(MSG_MSGBOX_WARNING_TITLE).c_str(), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND); + MessageBox(Parent, stdstr(Message).ToUTF16().c_str(), wGS(MSG_MSGBOX_WARNING_TITLE).c_str(), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND); } void CNotificationImp::DisplayWarning(LanguageStringID StringID) const @@ -79,7 +79,7 @@ void CNotificationImp::DisplayError(const char * Message) const { Parent = reinterpret_cast(m_hWnd->GetWindowHandle()); } - MessageBoxW(Parent, stdstr(Message).ToUTF16().c_str(), wGS(MSG_MSGBOX_ERROR_TITLE).c_str(), MB_OK | MB_ICONERROR | MB_SETFOREGROUND); + MessageBox(Parent, stdstr(Message).ToUTF16().c_str(), wGS(MSG_MSGBOX_ERROR_TITLE).c_str(), MB_OK | MB_ICONERROR | MB_SETFOREGROUND); } void CNotificationImp::DisplayMessage(int DisplayTime, LanguageStringID StringID) const @@ -140,7 +140,7 @@ bool CNotificationImp::AskYesNoQuestion(const char * Question) const { Parent = reinterpret_cast(m_hWnd->GetWindowHandle()); } - int result = MessageBoxW(Parent, stdstr(Question).ToUTF16().c_str(), wGS(MSG_MSGBOX_WARNING_TITLE).c_str(), MB_YESNO | MB_ICONWARNING | MB_DEFBUTTON2 | MB_SETFOREGROUND); + int result = MessageBox(Parent, stdstr(Question).ToUTF16().c_str(), wGS(MSG_MSGBOX_WARNING_TITLE).c_str(), MB_YESNO | MB_ICONWARNING | MB_DEFBUTTON2 | MB_SETFOREGROUND); return result == IDYES; } @@ -161,7 +161,7 @@ void CNotificationImp::FatalError(const char * Message) const HWND Parent = NULL; if (m_hWnd) { Parent = reinterpret_cast(m_hWnd->GetWindowHandle()); } - MessageBoxW(Parent, stdstr(Message).ToUTF16().c_str(), L"Error", MB_OK | MB_ICONERROR | MB_SETFOREGROUND); + MessageBox(Parent, stdstr(Message).ToUTF16().c_str(), L"Error", MB_OK | MB_ICONERROR | MB_SETFOREGROUND); ExitThread(0); } diff --git a/Source/Project64/UserInterface/RomBrowserClass.cpp b/Source/Project64/UserInterface/RomBrowserClass.cpp index a0d066e9f..05e072bae 100644 --- a/Source/Project64/UserInterface/RomBrowserClass.cpp +++ b/Source/Project64/UserInterface/RomBrowserClass.cpp @@ -114,11 +114,11 @@ int32_t CRomBrowser::CalcSortPosition(uint32_t lParam) } LastTestPos = TestPos; - LVITEMW lvItem; + LVITEM lvItem; memset(&lvItem, 0, sizeof(lvItem)); lvItem.mask = LVIF_PARAM; lvItem.iItem = TestPos; - if (!SendMessageW(m_hRomList, LVM_GETITEMW, 0, (LPARAM)&lvItem)) + if (!SendMessage(m_hRomList, LVM_GETITEM, 0, (LPARAM)&lvItem)) { return End; } @@ -157,7 +157,7 @@ int32_t CRomBrowser::CalcSortPosition(uint32_t lParam) memset(&lvItem, 0, sizeof(lvItem)); lvItem.mask = LVIF_PARAM; lvItem.iItem = NewTestPos; - if (!SendMessageW(m_hRomList, LVM_GETITEMW, 0, (LPARAM)&lvItem)) + if (!SendMessage(m_hRomList, LVM_GETITEM, 0, (LPARAM)&lvItem)) { return End; } @@ -193,7 +193,7 @@ int32_t CRomBrowser::CalcSortPosition(uint32_t lParam) memset(&lvItem, 0, sizeof(lvItem)); lvItem.mask = LVIF_PARAM; lvItem.iItem = NewTestPos; - if (!SendMessageW(m_hRomList, LVM_GETITEMW, 0, (LPARAM)&lvItem)) { return End; } + if (!SendMessage(m_hRomList, LVM_GETITEM, 0, (LPARAM)&lvItem)) { return End; } Result = RomList_CompareItems(lParam, lvItem.lParam, (uint32_t)&SortFieldInfo); if (Result >= 0) @@ -235,11 +235,11 @@ int32_t CRomBrowser::CalcSortPosition(uint32_t lParam) SortFieldInfo.Key = index; SortFieldInfo.KeyAscend = UISettingsLoadBoolIndex(RomBrowser_SortAscendingIndex, SortIndex) != 0; - LVITEMW lvItem; - memset(&lvItem, 0, sizeof(LVITEMW)); + LVITEM lvItem; + memset(&lvItem, 0, sizeof(LVITEM)); lvItem.mask = LVIF_PARAM; lvItem.iItem = End; - if (!SendMessageW(m_hRomList, LVM_GETITEMW, 0, (LPARAM)&lvItem)) { return End; } + if (!SendMessage(m_hRomList, LVM_GETITEM, 0, (LPARAM)&lvItem)) { return End; } int32_t Result = RomList_CompareItems(lParam, lvItem.lParam, (uint32_t)&SortFieldInfo); if (Result < 0) @@ -256,14 +256,14 @@ int32_t CRomBrowser::CalcSortPosition(uint32_t lParam) void CRomBrowser::RomAddedToList(int32_t ListPos) { - LVITEMW lvItem; + LVITEM lvItem; memset(&lvItem, 0, sizeof(lvItem)); lvItem.mask = LVIF_TEXT | LVIF_PARAM; lvItem.iItem = CalcSortPosition(ListPos); lvItem.lParam = (LPARAM)ListPos; - lvItem.pszText = LPSTR_TEXTCALLBACKW; + lvItem.pszText = LPSTR_TEXTCALLBACK; - int32_t index = SendMessageW(m_hRomList, LVM_INSERTITEMW, 0, (LPARAM)&lvItem); + int32_t index = SendMessage(m_hRomList, LVM_INSERTITEM, 0, (LPARAM)&lvItem); int32_t iItem = ListView_GetNextItem(m_hRomList, -1, LVNI_SELECTED); //if the last rom then highlight the item @@ -300,7 +300,7 @@ void CRomBrowser::RomListReset(void) void CRomBrowser::CreateRomListControl(void) { - m_hRomList = CreateWindowW(WC_LISTVIEWW, NULL, WS_TABSTOP | WS_VISIBLE | WS_CHILD | LVS_OWNERDRAWFIXED | LVS_SINGLESEL | LVS_REPORT, 0, 0, 0, 0, m_MainWindow, (HMENU)IDC_ROMLIST, GetModuleHandle(NULL), NULL); + m_hRomList = CreateWindow(WC_LISTVIEW, NULL, WS_TABSTOP | WS_VISIBLE | WS_CHILD | LVS_OWNERDRAWFIXED | LVS_SINGLESEL | LVS_REPORT, 0, 0, 0, 0, m_MainWindow, (HMENU)IDC_ROMLIST, GetModuleHandle(NULL), NULL); ResetRomBrowserColomuns(); LoadRomList(); } @@ -335,7 +335,7 @@ void CRomBrowser::HighLightLastRom(void) //Make sure Rom browser is visible if (!RomBrowserVisible()) { return; } - LVITEMW lvItem; + LVITEM lvItem; lvItem.mask = LVIF_PARAM; int32_t ItemCount = ListView_GetItemCount(m_hRomList); @@ -343,7 +343,7 @@ void CRomBrowser::HighLightLastRom(void) { //Get The next item lvItem.iItem = index; - if (!SendMessageW(m_hRomList, LVM_GETITEMW, 0, (LPARAM)&lvItem)) { return; } + if (!SendMessage(m_hRomList, LVM_GETITEM, 0, (LPARAM)&lvItem)) { return; } //Get the rom info for that item if (lvItem.lParam < 0 || lvItem.lParam >= (LPARAM)m_RomInfo.size()) @@ -369,7 +369,7 @@ void CRomBrowser::HighLightLastRom(void) void CRomBrowser::MenuSetText(HMENU hMenu, int32_t MenuPos, const wchar_t * Title, char * ShortCut) { - MENUITEMINFOW MenuInfo; + MENUITEMINFO MenuInfo; wchar_t String[256]; if (Title == NULL || wcslen(Title) == 0) { return; } @@ -382,17 +382,17 @@ void CRomBrowser::MenuSetText(HMENU hMenu, int32_t MenuPos, const wchar_t * Titl MenuInfo.dwTypeData = String; MenuInfo.cch = 256; - GetMenuItemInfoW(hMenu, MenuPos, TRUE, &MenuInfo); + GetMenuItemInfo(hMenu, MenuPos, TRUE, &MenuInfo); wcscpy(String, Title); if (wcschr(String, '\t') != NULL) { *(wcschr(String, '\t')) = '\0'; } if (ShortCut) { swprintf(String, sizeof(String) / sizeof(String[0]), L"%s\t%s", String, stdstr(ShortCut).ToUTF16().c_str()); } - SetMenuItemInfoW(hMenu, MenuPos, TRUE, &MenuInfo); + SetMenuItemInfo(hMenu, MenuPos, TRUE, &MenuInfo); } void CRomBrowser::ResetRomBrowserColomuns(void) { size_t Coloumn, index; - LV_COLUMNW lvColumn; + LV_COLUMN lvColumn; wchar_t szString[300]; GetFieldInfo(m_Fields); @@ -425,7 +425,7 @@ void CRomBrowser::ResetRomBrowserColomuns(void) m_FieldType[Coloumn] = m_Fields[index].ID(); lvColumn.cx = m_Fields[index].ColWidth(); wcsncpy(szString, wGS(m_Fields[index].LangID()).c_str(), sizeof(szString) / sizeof(szString[0])); - SendMessage(m_hRomList, LVM_INSERTCOLUMNW, (WPARAM)(int32_t)(Coloumn), (LPARAM)(const LV_COLUMNW *)(&lvColumn)); + SendMessage(m_hRomList, LVM_INSERTCOLUMN, (WPARAM)(int32_t)(Coloumn), (LPARAM)(const LV_COLUMN *)(&lvColumn)); } } @@ -481,14 +481,14 @@ bool CRomBrowser::RomListDrawItem(int32_t idCtrl, uint32_t lParam) RECT rcItem, rcDraw; wchar_t String[300]; - LVITEMW lvItem; + LVITEM lvItem; HBRUSH hBrush = (HBRUSH)(COLOR_WINDOW + 1); LV_COLUMN lvc; int32_t nColumn; lvItem.mask = LVIF_PARAM; lvItem.iItem = ditem->itemID; - if (!SendMessageW(m_hRomList, LVM_GETITEMW, 0, (LPARAM)&lvItem)) { return false; } + if (!SendMessage(m_hRomList, LVM_GETITEM, 0, (LPARAM)&lvItem)) { return false; } lvItem.state = ListView_GetItemState(m_hRomList, ditem->itemID, -1); bool bSelected = (lvItem.state & LVIS_SELECTED) != 0; @@ -527,7 +527,7 @@ bool CRomBrowser::RomListDrawItem(int32_t idCtrl, uint32_t lParam) lvItem.iSubItem = 0; lvItem.cchTextMax = sizeof(String) / sizeof(String[0]); lvItem.pszText = String; - SendMessageW(m_hRomList, LVM_GETITEMTEXTW, (WPARAM)ditem->itemID, (LPARAM)&lvItem); + SendMessage(m_hRomList, LVM_GETITEMTEXT, (WPARAM)ditem->itemID, (LPARAM)&lvItem); memcpy(&rcDraw, &rcItem, sizeof(RECT)); rcDraw.right -= 3; @@ -541,7 +541,7 @@ bool CRomBrowser::RomListDrawItem(int32_t idCtrl, uint32_t lParam) text = stdstr(pRomInfo->FileName).ToUTF16(); } - DrawTextW(ditem->hDC, text.c_str(), text.length(), &rcDraw, DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER | DT_WORD_ELLIPSIS); + DrawText(ditem->hDC, text.c_str(), text.length(), &rcDraw, DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER | DT_WORD_ELLIPSIS); memset(&lvc, 0, sizeof(lvc)); lvc.mask = LVCF_FMT | LVCF_WIDTH; @@ -553,7 +553,7 @@ bool CRomBrowser::RomListDrawItem(int32_t idCtrl, uint32_t lParam) lvItem.iSubItem = nColumn; lvItem.cchTextMax = sizeof(String) / sizeof(String[0]); lvItem.pszText = String; - SendMessageW(m_hRomList, LVM_GETITEMTEXTW, ditem->itemID, (LPARAM)&lvItem); + SendMessage(m_hRomList, LVM_GETITEMTEXT, ditem->itemID, (LPARAM)&lvItem); memcpy(&rcDraw, &rcItem, sizeof(RECT)); rcDraw.right -= 3; text = String; @@ -566,7 +566,7 @@ bool CRomBrowser::RomListDrawItem(int32_t idCtrl, uint32_t lParam) text = stdstr(pRomInfo->FileName).ToUTF16(); } - DrawTextW(ditem->hDC, text.c_str(), text.length(), &rcDraw, DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER | DT_WORD_ELLIPSIS); + DrawText(ditem->hDC, text.c_str(), text.length(), &rcDraw, DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER | DT_WORD_ELLIPSIS); } return true; } @@ -581,7 +581,7 @@ bool CRomBrowser::RomListNotify(int32_t idCtrl, uint32_t pnmh) case LVN_COLUMNCLICK: RomList_ColoumnSortList(pnmh); break; case NM_RETURN: RomList_OpenRom(pnmh); break; case NM_DBLCLK: RomList_OpenRom(pnmh); break; - case LVN_GETDISPINFOW: RomList_GetDispInfo(pnmh); break; + case LVN_GETDISPINFO: RomList_GetDispInfo(pnmh); break; case NM_RCLICK: RomList_PopupMenu(pnmh); break; case NM_CLICK: { @@ -687,7 +687,7 @@ int32_t CALLBACK CRomBrowser::RomList_CompareItems(uint32_t lParam1, uint32_t lP void CRomBrowser::RomList_GetDispInfo(uint32_t pnmh) { - LV_DISPINFOW * lpdi = (LV_DISPINFOW *)pnmh; + LV_DISPINFO * lpdi = (LV_DISPINFO *)pnmh; if (lpdi->item.lParam < 0 || lpdi->item.lParam >= (LPARAM)m_RomInfo.size()) { return; @@ -795,7 +795,7 @@ void CRomBrowser::RomList_OpenRom(uint32_t /*pnmh*/) memset(&lvItem, 0, sizeof(LV_ITEM)); lvItem.mask = LVIF_PARAM; lvItem.iItem = iItem; - if (!SendMessageW(m_hRomList, LVM_GETITEMW, 0, (LPARAM)&lvItem)) { return; } + if (!SendMessage(m_hRomList, LVM_GETITEM, 0, (LPARAM)&lvItem)) { return; } if (lvItem.lParam < 0 || lvItem.lParam >= (LPARAM)m_RomInfo.size()) { return; @@ -821,7 +821,7 @@ void CRomBrowser::RomList_PopupMenu(uint32_t /*pnmh*/) memset(&lvItem, 0, sizeof(LV_ITEM)); lvItem.mask = LVIF_PARAM; lvItem.iItem = iItem; - if (!SendMessageW(m_hRomList, LVM_GETITEMW, 0, (LPARAM)&lvItem)) { return; } + if (!SendMessage(m_hRomList, LVM_GETITEM, 0, (LPARAM)&lvItem)) { return; } if (lvItem.lParam < 0 || lvItem.lParam >= (LPARAM)m_RomInfo.size()) { return; @@ -878,7 +878,7 @@ void CRomBrowser::RomList_PopupMenu(uint32_t /*pnmh*/) if (GfxMenu) { MENUITEMINFO lpmii; - InsertMenuW(hPopupMenu, 7, MF_POPUP | MF_BYPOSITION, (uint32_t)GfxMenu, wGS(POPUP_GFX_PLUGIN).c_str()); + InsertMenu(hPopupMenu, 7, MF_POPUP | MF_BYPOSITION, (uint32_t)GfxMenu, wGS(POPUP_GFX_PLUGIN).c_str()); lpmii.cbSize = sizeof(MENUITEMINFO); lpmii.fMask = MIIM_STATE; lpmii.fState = 0; @@ -962,7 +962,7 @@ int32_t CALLBACK CRomBrowser::SelectRomDirCallBack(HWND hwnd, uint32_t uMsg, uin if (lpData) { SendMessage(hwnd, BFFM_SETSELECTION, TRUE, lpData); - SetWindowTextW(hwnd, wGS(DIR_SELECT_ROM).c_str()); + SetWindowText(hwnd, wGS(DIR_SELECT_ROM).c_str()); } break; } @@ -973,7 +973,7 @@ void CRomBrowser::SelectRomDir(void) { wchar_t SelectedDir[MAX_PATH]; LPITEMIDLIST pidl; - BROWSEINFOW bi; + BROWSEINFO bi; std::wstring title = wGS(SELECT_ROM_DIR); @@ -987,7 +987,7 @@ void CRomBrowser::SelectRomDir(void) bi.lpfn = (BFFCALLBACK)SelectRomDirCallBack; bi.lParam = (uint32_t)RomDir.c_str(); WriteTrace(TraceUserInterface, TraceDebug, "2"); - if ((pidl = SHBrowseForFolderW(&bi)) != NULL) + if ((pidl = SHBrowseForFolder(&bi)) != NULL) { WriteTrace(TraceUserInterface, TraceDebug, "3"); char Directory[_MAX_PATH]; diff --git a/Source/Project64/UserInterface/RomInformationClass.cpp b/Source/Project64/UserInterface/RomInformationClass.cpp index f1d98a542..97f513784 100644 --- a/Source/Project64/UserInterface/RomInformationClass.cpp +++ b/Source/Project64/UserInterface/RomInformationClass.cpp @@ -73,7 +73,7 @@ void RomInformation::DisplayInformation(HWND hParent) const { if (m_FileName.length() == 0) { return; } - DialogBoxParamW(GetModuleHandle(NULL), MAKEINTRESOURCEW(IDD_Rom_Information), hParent, (DLGPROC)RomInfoProc, (DWORD)this); + DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_Rom_Information), hParent, (DLGPROC)RomInfoProc, (DWORD)this); } DWORD CALLBACK RomInfoProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam) @@ -88,56 +88,56 @@ DWORD CALLBACK RomInfoProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam) if (_this->m_pDiskInfo == NULL) { - SetWindowTextW(hDlg, wGS(INFO_TITLE).c_str()); + SetWindowText(hDlg, wGS(INFO_TITLE).c_str()); - SetDlgItemTextW(hDlg, IDC_ROM_NAME, wGS(INFO_ROM_NAME_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_FILE_NAME, wGS(INFO_FILE_NAME_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_LOCATION, wGS(INFO_LOCATION_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_ROM_MD5, wGS(INFO_MD5_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_ROM_SIZE, wGS(INFO_SIZE_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_CART_ID, wGS(INFO_CART_ID_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_MANUFACTURER, wGS(INFO_MANUFACTURER_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_COUNTRY, wGS(INFO_COUNTRY_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_CRC1, wGS(INFO_CRC1_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_CRC2, wGS(INFO_CRC2_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_CIC_CHIP, wGS(INFO_CIC_CHIP_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_CLOSE_BUTTON, wGS(BOTTOM_CLOSE).c_str()); + SetDlgItemText(hDlg, IDC_ROM_NAME, wGS(INFO_ROM_NAME_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_FILE_NAME, wGS(INFO_FILE_NAME_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_LOCATION, wGS(INFO_LOCATION_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_ROM_MD5, wGS(INFO_MD5_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_ROM_SIZE, wGS(INFO_SIZE_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_CART_ID, wGS(INFO_CART_ID_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_MANUFACTURER, wGS(INFO_MANUFACTURER_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_COUNTRY, wGS(INFO_COUNTRY_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_CRC1, wGS(INFO_CRC1_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_CRC2, wGS(INFO_CRC2_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_CIC_CHIP, wGS(INFO_CIC_CHIP_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_CLOSE_BUTTON, wGS(BOTTOM_CLOSE).c_str()); - SetDlgItemTextW(hDlg, IDC_INFO_ROMNAME, stdstr(_this->m_pRomInfo->GetRomName()).ToUTF16(stdstr::CODEPAGE_932).c_str()); + SetDlgItemText(hDlg, IDC_INFO_ROMNAME, stdstr(_this->m_pRomInfo->GetRomName()).ToUTF16(stdstr::CODEPAGE_932).c_str()); - SetDlgItemTextW(hDlg, IDC_INFO_FILENAME, stdstr(CPath(_this->m_pRomInfo->GetFileName()).GetNameExtension()).ToUTF16(CP_ACP).c_str()); - SetDlgItemTextW(hDlg, IDC_INFO_LOCATION, stdstr(CPath(_this->m_pRomInfo->GetFileName()).GetDriveDirectory()).ToUTF16(CP_ACP).c_str()); + SetDlgItemText(hDlg, IDC_INFO_FILENAME, stdstr(CPath(_this->m_pRomInfo->GetFileName()).GetNameExtension()).ToUTF16(CP_ACP).c_str()); + SetDlgItemText(hDlg, IDC_INFO_LOCATION, stdstr(CPath(_this->m_pRomInfo->GetFileName()).GetDriveDirectory()).ToUTF16(CP_ACP).c_str()); - SetDlgItemTextW(hDlg, IDC_INFO_MD5, stdstr(_this->m_pRomInfo->GetRomMD5()).ToUTF16().c_str()); - SetDlgItemTextW(hDlg, IDC_INFO_ROMSIZE, stdstr_f("%.1f MBit", (float)_this->m_pRomInfo->GetRomSize() / 0x20000).ToUTF16().c_str()); + SetDlgItemText(hDlg, IDC_INFO_MD5, stdstr(_this->m_pRomInfo->GetRomMD5()).ToUTF16().c_str()); + SetDlgItemText(hDlg, IDC_INFO_ROMSIZE, stdstr_f("%.1f MBit", (float)_this->m_pRomInfo->GetRomSize() / 0x20000).ToUTF16().c_str()); BYTE * RomHeader = _this->m_pRomInfo->GetRomAddress(); - SetDlgItemTextW(hDlg, IDC_INFO_CARTID, stdstr_f("%c%c", RomHeader[0x3F], RomHeader[0x3E]).ToUTF16().c_str()); + SetDlgItemText(hDlg, IDC_INFO_CARTID, stdstr_f("%c%c", RomHeader[0x3F], RomHeader[0x3E]).ToUTF16().c_str()); switch (RomHeader[0x38]) { - case 'N': SetDlgItemTextW(hDlg, IDC_INFO_MANUFACTURER, L"Nintendo"); break; - case 0: SetDlgItemTextW(hDlg, IDC_INFO_MANUFACTURER, L"None"); break; - default: SetDlgItemTextW(hDlg, IDC_INFO_MANUFACTURER, L"(Unknown)"); break; + case 'N': SetDlgItemText(hDlg, IDC_INFO_MANUFACTURER, L"Nintendo"); break; + case 0: SetDlgItemText(hDlg, IDC_INFO_MANUFACTURER, L"None"); break; + default: SetDlgItemText(hDlg, IDC_INFO_MANUFACTURER, L"(Unknown)"); break; } switch (RomHeader[0x3D]) { - case Country_NTSC_BETA: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Beta"); break; - case Country_Asian_NTSC: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"NTSC"); break; - case Country_Germany: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Germany"); break; - case Country_NorthAmerica: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"America"); break; - case Country_French: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"France"); break; - case Country_Italian: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Italy"); break; - case Country_Japan: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Japan"); break; - case Country_Europe: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Europe"); break; - case Country_Spanish: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Spain"); break; - case Country_Australia: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Australia"); break; - case Country_EuropeanX_PAL: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"PAL"); break; - case Country_EuropeanY_PAL: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"PAL"); break; - case Country_Unknown: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"None"); break; + case Country_NTSC_BETA: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Beta"); break; + case Country_Asian_NTSC: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"NTSC"); break; + case Country_Germany: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Germany"); break; + case Country_NorthAmerica: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"America"); break; + case Country_French: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"France"); break; + case Country_Italian: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Italy"); break; + case Country_Japan: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Japan"); break; + case Country_Europe: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Europe"); break; + case Country_Spanish: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Spain"); break; + case Country_Australia: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Australia"); break; + case Country_EuropeanX_PAL: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"PAL"); break; + case Country_EuropeanY_PAL: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"PAL"); break; + case Country_Unknown: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"None"); break; default: - SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, stdstr_f(" Unknown %c (%02X)", RomHeader[0x3D], RomHeader[0x3D]).ToUTF16().c_str()); + SetDlgItemText(hDlg, IDC_INFO_COUNTRY, stdstr_f(" Unknown %c (%02X)", RomHeader[0x3D], RomHeader[0x3D]).ToUTF16().c_str()); } switch (_this->m_pRomInfo->CicChipID()) @@ -145,12 +145,12 @@ DWORD CALLBACK RomInfoProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam) case CIC_NUS_8303: case CIC_NUS_DDUS: case CIC_NUS_DDTL: - SetDlgItemTextW(hDlg, IDC_INFO_CRC1, stdstr_f("0x%08X", (*(uint16_t *)(RomHeader + 0x608) << 16) | *(uint16_t *)(RomHeader + 0x60C)).ToUTF16().c_str()); - SetDlgItemTextW(hDlg, IDC_INFO_CRC2, stdstr_f("0x%08X", (*(uint16_t *)(RomHeader + 0x638) << 16) | *(uint16_t *)(RomHeader + 0x63C)).ToUTF16().c_str()); + SetDlgItemText(hDlg, IDC_INFO_CRC1, stdstr_f("0x%08X", (*(uint16_t *)(RomHeader + 0x608) << 16) | *(uint16_t *)(RomHeader + 0x60C)).ToUTF16().c_str()); + SetDlgItemText(hDlg, IDC_INFO_CRC2, stdstr_f("0x%08X", (*(uint16_t *)(RomHeader + 0x638) << 16) | *(uint16_t *)(RomHeader + 0x63C)).ToUTF16().c_str()); break; default: - SetDlgItemTextW(hDlg, IDC_INFO_CRC1, stdstr_f("0x%08X", *(uint32_t *)(RomHeader + 0x10)).ToUTF16().c_str()); - SetDlgItemTextW(hDlg, IDC_INFO_CRC2, stdstr_f("0x%08X", *(DWORD *)(RomHeader + 0x14)).ToUTF16().c_str()); + SetDlgItemText(hDlg, IDC_INFO_CRC1, stdstr_f("0x%08X", *(uint32_t *)(RomHeader + 0x10)).ToUTF16().c_str()); + SetDlgItemText(hDlg, IDC_INFO_CRC2, stdstr_f("0x%08X", *(DWORD *)(RomHeader + 0x14)).ToUTF16().c_str()); break; } @@ -164,63 +164,63 @@ DWORD CALLBACK RomInfoProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam) case CIC_NUS_DDTL: CicChip = L"CIC-NUS-????"; break; default: CicChip = stdstr_f("CIC-NUS-610%d", _this->m_pRomInfo->CicChipID()).ToUTF16(); break; } - SetDlgItemTextW(hDlg, IDC_INFO_CIC, CicChip.c_str()); + SetDlgItemText(hDlg, IDC_INFO_CIC, CicChip.c_str()); } else { - SetWindowTextW(hDlg, wGS(INFO_TITLE).c_str()); + SetWindowText(hDlg, wGS(INFO_TITLE).c_str()); - SetDlgItemTextW(hDlg, IDC_ROM_NAME, wGS(INFO_ROM_NAME_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_FILE_NAME, wGS(INFO_FILE_NAME_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_LOCATION, wGS(INFO_LOCATION_TEXT).c_str()); - //SetDlgItemTextW(hDlg, IDC_ROM_MD5, wGS(INFO_MD5_TEXT).c_str()); - //SetDlgItemTextW(hDlg, IDC_ROM_SIZE, wGS(INFO_SIZE_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_CART_ID, wGS(INFO_CART_ID_TEXT).c_str()); - //SetDlgItemTextW(hDlg, IDC_MANUFACTURER, wGS(INFO_MANUFACTURER_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_COUNTRY, wGS(INFO_COUNTRY_TEXT).c_str()); - //SetDlgItemTextW(hDlg, IDC_CRC1, wGS(INFO_CRC1_TEXT).c_str()); - //SetDlgItemTextW(hDlg, IDC_CRC2, wGS(INFO_CRC2_TEXT).c_str()); - //SetDlgItemTextW(hDlg, IDC_CIC_CHIP, wGS(INFO_CIC_CHIP_TEXT).c_str()); - SetDlgItemTextW(hDlg, IDC_CLOSE_BUTTON, wGS(BOTTOM_CLOSE).c_str()); + SetDlgItemText(hDlg, IDC_ROM_NAME, wGS(INFO_ROM_NAME_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_FILE_NAME, wGS(INFO_FILE_NAME_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_LOCATION, wGS(INFO_LOCATION_TEXT).c_str()); + //SetDlgItemText(hDlg, IDC_ROM_MD5, wGS(INFO_MD5_TEXT).c_str()); + //SetDlgItemText(hDlg, IDC_ROM_SIZE, wGS(INFO_SIZE_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_CART_ID, wGS(INFO_CART_ID_TEXT).c_str()); + //SetDlgItemText(hDlg, IDC_MANUFACTURER, wGS(INFO_MANUFACTURER_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_COUNTRY, wGS(INFO_COUNTRY_TEXT).c_str()); + //SetDlgItemText(hDlg, IDC_CRC1, wGS(INFO_CRC1_TEXT).c_str()); + //SetDlgItemText(hDlg, IDC_CRC2, wGS(INFO_CRC2_TEXT).c_str()); + //SetDlgItemText(hDlg, IDC_CIC_CHIP, wGS(INFO_CIC_CHIP_TEXT).c_str()); + SetDlgItemText(hDlg, IDC_CLOSE_BUTTON, wGS(BOTTOM_CLOSE).c_str()); - SetDlgItemTextW(hDlg, IDC_INFO_ROMNAME, _this->m_pDiskInfo->GetRomName().ToUTF16(stdstr::CODEPAGE_932).c_str()); + SetDlgItemText(hDlg, IDC_INFO_ROMNAME, _this->m_pDiskInfo->GetRomName().ToUTF16(stdstr::CODEPAGE_932).c_str()); - SetDlgItemTextW(hDlg, IDC_INFO_FILENAME, stdstr(CPath(_this->m_pDiskInfo->GetFileName()).GetNameExtension()).ToUTF16(CP_ACP).c_str()); - SetDlgItemTextW(hDlg, IDC_INFO_LOCATION, stdstr(CPath(_this->m_pDiskInfo->GetFileName()).GetDriveDirectory()).ToUTF16(CP_ACP).c_str()); + SetDlgItemText(hDlg, IDC_INFO_FILENAME, stdstr(CPath(_this->m_pDiskInfo->GetFileName()).GetNameExtension()).ToUTF16(CP_ACP).c_str()); + SetDlgItemText(hDlg, IDC_INFO_LOCATION, stdstr(CPath(_this->m_pDiskInfo->GetFileName()).GetDriveDirectory()).ToUTF16(CP_ACP).c_str()); - //SetDlgItemTextW(hDlg, IDC_INFO_MD5, _this->m_pRomInfo->GetRomMD5().ToUTF16().c_str()); - //SetDlgItemTextW(hDlg, IDC_INFO_ROMSIZE, stdstr_f("%.1f MBit", (float)_this->m_pDiskInfo->GetRomSize() / 0x20000).ToUTF16().c_str()); + //SetDlgItemText(hDlg, IDC_INFO_MD5, _this->m_pRomInfo->GetRomMD5().ToUTF16().c_str()); + //SetDlgItemText(hDlg, IDC_INFO_ROMSIZE, stdstr_f("%.1f MBit", (float)_this->m_pDiskInfo->GetRomSize() / 0x20000).ToUTF16().c_str()); BYTE * DiskHeader = _this->m_pDiskInfo->GetDiskAddressID(); - SetDlgItemTextW(hDlg, IDC_INFO_CARTID, stdstr_f("%c%c", DiskHeader[0x02], DiskHeader[0x01]).ToUTF16().c_str()); + SetDlgItemText(hDlg, IDC_INFO_CARTID, stdstr_f("%c%c", DiskHeader[0x02], DiskHeader[0x01]).ToUTF16().c_str()); /*switch (DiskHeader[0x00]) { - case 'N': SetDlgItemTextW(hDlg, IDC_INFO_MANUFACTURER, L"Nintendo"); break; - case 0: SetDlgItemTextW(hDlg, IDC_INFO_MANUFACTURER, L"None"); break; - default: SetDlgItemTextW(hDlg, IDC_INFO_MANUFACTURER, L"(Unknown)"); break; + case 'N': SetDlgItemText(hDlg, IDC_INFO_MANUFACTURER, L"Nintendo"); break; + case 0: SetDlgItemText(hDlg, IDC_INFO_MANUFACTURER, L"None"); break; + default: SetDlgItemText(hDlg, IDC_INFO_MANUFACTURER, L"(Unknown)"); break; }*/ switch (DiskHeader[0x00]) { - case Country_NTSC_BETA: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Beta"); break; - case Country_Asian_NTSC: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"NTSC"); break; - case Country_Germany: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Germany"); break; - case Country_NorthAmerica: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"America"); break; - case Country_French: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"France"); break; - case Country_Italian: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Italy"); break; - case Country_Japan: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Japan"); break; - case Country_Europe: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Europe"); break; - case Country_Spanish: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Spain"); break; - case Country_Australia: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"Australia"); break; - case Country_EuropeanX_PAL: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"PAL"); break; - case Country_EuropeanY_PAL: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"PAL"); break; - case Country_Unknown: SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, L"None"); break; + case Country_NTSC_BETA: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Beta"); break; + case Country_Asian_NTSC: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"NTSC"); break; + case Country_Germany: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Germany"); break; + case Country_NorthAmerica: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"America"); break; + case Country_French: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"France"); break; + case Country_Italian: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Italy"); break; + case Country_Japan: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Japan"); break; + case Country_Europe: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Europe"); break; + case Country_Spanish: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Spain"); break; + case Country_Australia: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"Australia"); break; + case Country_EuropeanX_PAL: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"PAL"); break; + case Country_EuropeanY_PAL: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"PAL"); break; + case Country_Unknown: SetDlgItemText(hDlg, IDC_INFO_COUNTRY, L"None"); break; default: - SetDlgItemTextW(hDlg, IDC_INFO_COUNTRY, stdstr_f(" Unknown %c (%02X)", DiskHeader[0x03], DiskHeader[0x03]).ToUTF16().c_str()); + SetDlgItemText(hDlg, IDC_INFO_COUNTRY, stdstr_f(" Unknown %c (%02X)", DiskHeader[0x03], DiskHeader[0x03]).ToUTF16().c_str()); } - SetDlgItemTextW(hDlg, IDC_INFO_CRC1, stdstr_f("0x%08X", (_this->m_pDiskInfo->CalculateCrc())).ToUTF16().c_str()); - SetDlgItemTextW(hDlg, IDC_INFO_CRC2, stdstr_f("0x%08X", (~_this->m_pDiskInfo->CalculateCrc())).ToUTF16().c_str()); + SetDlgItemText(hDlg, IDC_INFO_CRC1, stdstr_f("0x%08X", (_this->m_pDiskInfo->CalculateCrc())).ToUTF16().c_str()); + SetDlgItemText(hDlg, IDC_INFO_CRC2, stdstr_f("0x%08X", (~_this->m_pDiskInfo->CalculateCrc())).ToUTF16().c_str()); /* std::wstring CicChip; switch (_this->m_pRomInfo->CicChipID()) @@ -231,7 +231,7 @@ DWORD CALLBACK RomInfoProc(HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam) case CIC_NUS_DDUS: CicChip = L"CIC-NUS-????"; break; default: CicChip = stdstr_f("CIC-NUS-610%d", _this->m_pRomInfo->CicChipID()).ToUTF16(); break; } - SetDlgItemTextW(hDlg, IDC_INFO_CIC, CicChip.c_str()); + SetDlgItemText(hDlg, IDC_INFO_CIC, CicChip.c_str()); */ } } diff --git a/Source/Project64/UserInterface/Settings/SettingsPage-Directories.cpp b/Source/Project64/UserInterface/Settings/SettingsPage-Directories.cpp index b89f603a9..ed6572594 100644 --- a/Source/Project64/UserInterface/Settings/SettingsPage-Directories.cpp +++ b/Source/Project64/UserInterface/Settings/SettingsPage-Directories.cpp @@ -46,11 +46,11 @@ m_InUpdateSettings(false) m_TextureSelected.Attach(GetDlgItem(IDC_TEXTURE_OTHER)); //Set Text language for the dialog box - ::SetWindowTextW(m_PluginGroup.m_hWnd, wGS(DIR_PLUGIN).c_str()); - ::SetWindowTextW(m_AutoSaveGroup.m_hWnd, wGS(DIR_AUTO_SAVE).c_str()); - ::SetWindowTextW(m_InstantSaveGroup.m_hWnd, wGS(DIR_INSTANT_SAVE).c_str()); - ::SetWindowTextW(m_ScreenShotGroup.m_hWnd, wGS(DIR_SCREEN_SHOT).c_str()); - ::SetWindowTextW(m_TextureGroup.m_hWnd, wGS(DIR_TEXTURE).c_str()); + ::SetWindowText(m_PluginGroup.m_hWnd, wGS(DIR_PLUGIN).c_str()); + ::SetWindowText(m_AutoSaveGroup.m_hWnd, wGS(DIR_AUTO_SAVE).c_str()); + ::SetWindowText(m_InstantSaveGroup.m_hWnd, wGS(DIR_INSTANT_SAVE).c_str()); + ::SetWindowText(m_ScreenShotGroup.m_hWnd, wGS(DIR_SCREEN_SHOT).c_str()); + ::SetWindowText(m_TextureGroup.m_hWnd, wGS(DIR_TEXTURE).c_str()); UpdatePageSettings(); } @@ -75,7 +75,7 @@ void COptionsDirectoriesPage::SelectDirectory(LanguageStringID Title, CModifiedE { wchar_t Buffer[MAX_PATH], Directory[MAX_PATH]; LPITEMIDLIST pidl; - BROWSEINFOW bi; + BROWSEINFO bi; stdstr InitialDir = EditBox.GetWindowText(); std::wstring wTitle = wGS(Title); @@ -86,9 +86,9 @@ void COptionsDirectoriesPage::SelectDirectory(LanguageStringID Title, CModifiedE bi.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS; bi.lpfn = (BFFCALLBACK)SelectDirCallBack; bi.lParam = (DWORD)InitialDir.c_str(); - if ((pidl = SHBrowseForFolderW(&bi)) != NULL) + if ((pidl = SHBrowseForFolder(&bi)) != NULL) { - if (SHGetPathFromIDListW(pidl, Directory)) + if (SHGetPathFromIDList(pidl, Directory)) { stdstr path; CPath SelectedDir(path.FromUTF16(Directory), ""); diff --git a/Source/Project64/UserInterface/Settings/SettingsPage-GameBrowser.cpp b/Source/Project64/UserInterface/Settings/SettingsPage-GameBrowser.cpp index 299d62915..67c997610 100644 --- a/Source/Project64/UserInterface/Settings/SettingsPage-GameBrowser.cpp +++ b/Source/Project64/UserInterface/Settings/SettingsPage-GameBrowser.cpp @@ -60,12 +60,12 @@ void COptionsGameBrowserPage::UpdateFieldList(const ROMBROWSER_FIELDS_LIST & Fie int Pos = Fields[i].Pos(); if (Pos < 0) { - m_Avaliable.SetItemData(m_Avaliable.AddStringW(wGS(Fields[i].LangID()).c_str()), i); + m_Avaliable.SetItemData(m_Avaliable.AddString(wGS(Fields[i].LangID()).c_str()), i); continue; } int listCount = m_Using.GetCount(); if (Pos > listCount) { Pos = listCount; } - m_Using.SetItemData(m_Using.InsertStringW(Pos, wGS(Fields[i].LangID()).c_str()), i); + m_Using.SetItemData(m_Using.InsertString(Pos, wGS(Fields[i].LangID()).c_str()), i); } } @@ -113,7 +113,7 @@ void COptionsGameBrowserPage::AddFieldClicked(UINT /*Code*/, int /*id*/, HWND /* m_Avaliable.SetCurSel(index); //Add to list - index = m_Using.AddStringW(wGS(m_Fields[i].LangID()).c_str()); + index = m_Using.AddString(wGS(m_Fields[i].LangID()).c_str()); m_Using.SetItemData(index, i); m_Using.SetCurSel(index); @@ -139,7 +139,7 @@ void COptionsGameBrowserPage::RemoveFieldClicked(UINT /*Code*/, int /*id*/, HWND m_Using.SetCurSel(index); //Add to list - index = m_Avaliable.AddStringW(wGS(m_Fields[i].LangID()).c_str()); + index = m_Avaliable.AddString(wGS(m_Fields[i].LangID()).c_str()); m_Avaliable.SetItemData(index, i); m_Avaliable.SetCurSel(index); @@ -158,7 +158,7 @@ void COptionsGameBrowserPage::MoveFieldUpClicked(UINT /*Code*/, int /*id*/, HWND int i = m_Using.GetItemData(index); m_Using.DeleteString(index); - index = m_Using.InsertStringW(index - 1, wGS(m_Fields[i].LangID()).c_str()); + index = m_Using.InsertString(index - 1, wGS(m_Fields[i].LangID()).c_str()); m_Using.SetItemData(index, i); m_Using.SetCurSel(index); @@ -177,7 +177,7 @@ void COptionsGameBrowserPage::MoveFieldDownClicked(UINT /*Code*/, int /*id*/, HW int i = m_Using.GetItemData(index); m_Using.DeleteString(index); - index = m_Using.InsertStringW(index + 1, wGS(m_Fields[i].LangID()).c_str()); + index = m_Using.InsertString(index + 1, wGS(m_Fields[i].LangID()).c_str()); m_Using.SetItemData(index, i); m_Using.SetCurSel(index); diff --git a/Source/Project64/UserInterface/Settings/SettingsPage-KeyboardShortcuts.cpp b/Source/Project64/UserInterface/Settings/SettingsPage-KeyboardShortcuts.cpp index ecd28e041..cab00575f 100644 --- a/Source/Project64/UserInterface/Settings/SettingsPage-KeyboardShortcuts.cpp +++ b/Source/Project64/UserInterface/Settings/SettingsPage-KeyboardShortcuts.cpp @@ -37,9 +37,9 @@ COptionsShortCutsPage::COptionsShortCutsPage(HWND hParent, const RECT & rcDispay m_MenuItems.ModifyStyle(0, TVS_SHOWSELALWAYS); - m_CpuState.SetItemData(m_CpuState.AddStringW(wGS(ACCEL_CPUSTATE_1).c_str()), CMenuShortCutKey::RUNNING_STATE_NOT_RUNNING); - m_CpuState.SetItemData(m_CpuState.AddStringW(wGS(ACCEL_CPUSTATE_3).c_str()), CMenuShortCutKey::RUNNING_STATE_WINDOWED); - m_CpuState.SetItemData(m_CpuState.AddStringW(wGS(ACCEL_CPUSTATE_4).c_str()), CMenuShortCutKey::RUNNING_STATE_FULLSCREEN); + m_CpuState.SetItemData(m_CpuState.AddString(wGS(ACCEL_CPUSTATE_1).c_str()), CMenuShortCutKey::RUNNING_STATE_NOT_RUNNING); + m_CpuState.SetItemData(m_CpuState.AddString(wGS(ACCEL_CPUSTATE_3).c_str()), CMenuShortCutKey::RUNNING_STATE_WINDOWED); + m_CpuState.SetItemData(m_CpuState.AddString(wGS(ACCEL_CPUSTATE_4).c_str()), CMenuShortCutKey::RUNNING_STATE_FULLSCREEN); m_CpuState.SetCurSel(0); int VirtualKeyListSize; @@ -99,7 +99,7 @@ void COptionsShortCutsPage::OnCpuStateChanged(UINT /*Code*/, int /*id*/, HWND /* if (hParent == NULL) { - hParent = m_MenuItems.InsertItemW(TVIF_TEXT | TVIF_PARAM, wGS(Item->second.Section()).c_str(), 0, 0, 0, 0, Item->second.Section(), TVI_ROOT, TVI_LAST); + hParent = m_MenuItems.InsertItem(TVIF_TEXT | TVIF_PARAM, wGS(Item->second.Section()).c_str(), 0, 0, 0, 0, Item->second.Section(), TVI_ROOT, TVI_LAST); } wstring str = wGS(Item->second.Title()); @@ -116,7 +116,7 @@ void COptionsShortCutsPage::OnCpuStateChanged(UINT /*Code*/, int /*id*/, HWND /* pos = str.find(L"...", pos); } - HTREEITEM hItem = m_MenuItems.InsertItemW(TVIF_TEXT | TVIF_PARAM, str.c_str(), 0, 0, 0, 0, (DWORD_PTR)&Item->second, hParent, TVI_LAST); + HTREEITEM hItem = m_MenuItems.InsertItem(TVIF_TEXT | TVIF_PARAM, str.c_str(), 0, 0, 0, 0, (DWORD_PTR)&Item->second, hParent, TVI_LAST); const SHORTCUT_KEY_LIST & ShortCutList = Item->second.GetAccelItems(); for (SHORTCUT_KEY_LIST::const_iterator ShortCut_item = ShortCutList.begin(); ShortCut_item != ShortCutList.end(); ShortCut_item++) diff --git a/Source/Project64/UserInterface/Settings/SettingsPage.h b/Source/Project64/UserInterface/Settings/SettingsPage.h index 2e88987bb..68e78974c 100644 --- a/Source/Project64/UserInterface/Settings/SettingsPage.h +++ b/Source/Project64/UserInterface/Settings/SettingsPage.h @@ -67,7 +67,7 @@ protected: #ifdef _DEBUG m_bModal = false; #endif //_DEBUG - m_hWnd = ::CreateDialogParamW(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCEW(static_cast(this)->IDD), hParent, T::StartDialogProc, NULL); + m_hWnd = ::CreateDialogParam(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCE(static_cast(this)->IDD), hParent, T::StartDialogProc, NULL); if (m_hWnd == NULL) { return false; diff --git a/Source/Project64/UserInterface/SettingsConfig.cpp b/Source/Project64/UserInterface/SettingsConfig.cpp index db806cd43..bae5001a5 100644 --- a/Source/Project64/UserInterface/SettingsConfig.cpp +++ b/Source/Project64/UserInterface/SettingsConfig.cpp @@ -37,7 +37,7 @@ void CSettingConfig::Display(void * ParentWindow) #ifdef _DEBUG m_bModal = true; #endif //_DEBUG - ::DialogBoxParamW(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCEW(IDD), (HWND)ParentWindow, StartDialogProc, NULL); + ::DialogBoxParam(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCE(IDD), (HWND)ParentWindow, StartDialogProc, NULL); } if (g_BaseSystem) @@ -65,8 +65,8 @@ void CSettingConfig::UpdateAdvanced(bool AdvancedMode, HTREEITEM hItem) } else if (AdvancedMode && Page == m_GeneralOptionsPage) { - m_PagesTreeList.InsertItemW(TVIF_TEXT | TVIF_PARAM, wGS(m_AdvancedPage->PageTitle()).c_str(), 0, 0, 0, 0, (ULONG)m_AdvancedPage, hItem, TVI_FIRST); - m_PagesTreeList.InsertItemW(TVIF_TEXT | TVIF_PARAM, wGS(m_DefaultsPage->PageTitle()).c_str(), 0, 0, 0, 0, (ULONG)m_DefaultsPage, hItem, TVI_FIRST); + m_PagesTreeList.InsertItem(TVIF_TEXT | TVIF_PARAM, wGS(m_AdvancedPage->PageTitle()).c_str(), 0, 0, 0, 0, (ULONG)m_AdvancedPage, hItem, TVI_FIRST); + m_PagesTreeList.InsertItem(TVIF_TEXT | TVIF_PARAM, wGS(m_DefaultsPage->PageTitle()).c_str(), 0, 0, 0, 0, (ULONG)m_DefaultsPage, hItem, TVI_FIRST); break; } else @@ -118,7 +118,7 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /* } else { - ::SetWindowTextW(m_hWnd, wGS(OPTIONS_TITLE).c_str()); + ::SetWindowText(m_hWnd, wGS(OPTIONS_TITLE).c_str()); } if (UISettingsLoadBool(Setting_PluginPageFirst)) @@ -190,14 +190,14 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /* } if (i == 0) { - hSectionItem = m_PagesTreeList.InsertItemW(TVIF_TEXT | TVIF_PARAM, Section->GetPageTitle(), 0, 0, 0, 0, (ULONG)Page, TVI_ROOT, TVI_LAST); + hSectionItem = m_PagesTreeList.InsertItem(TVIF_TEXT | TVIF_PARAM, Section->GetPageTitle(), 0, 0, 0, 0, (ULONG)Page, TVI_ROOT, TVI_LAST); continue; } if (hSectionItem == NULL) { continue; } - m_PagesTreeList.InsertItemW(TVIF_TEXT | TVIF_PARAM, wGS(Page->PageTitle()).c_str(), 0, 0, 0, 0, (ULONG)Page, hSectionItem, TVI_LAST); + m_PagesTreeList.InsertItem(TVIF_TEXT | TVIF_PARAM, wGS(Page->PageTitle()).c_str(), 0, 0, 0, 0, (ULONG)Page, hSectionItem, TVI_LAST); } if (bFirstItem && hSectionItem != NULL) { diff --git a/Source/Project64/UserInterface/WTLControls/PartialGroupBox.cpp b/Source/Project64/UserInterface/WTLControls/PartialGroupBox.cpp index 10cb9e6ea..de24297b9 100644 --- a/Source/Project64/UserInterface/WTLControls/PartialGroupBox.cpp +++ b/Source/Project64/UserInterface/WTLControls/PartialGroupBox.cpp @@ -23,7 +23,7 @@ BOOL CPartialGroupBox::Attach(HWND hWnd) return FALSE; } WNDPROC pProc = m_thunk.GetWNDPROC(); - WNDPROC pfnWndProc = (WNDPROC)::SetWindowLongPtrW(hWnd, GWLP_WNDPROC, (LONG_PTR)pProc); + WNDPROC pfnWndProc = (WNDPROC)::SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)pProc); if (pfnWndProc == NULL) return FALSE; m_pfnSuperWindowProc = pfnWndProc; @@ -65,10 +65,10 @@ void CPartialGroupBox::OnPaint(HDC /*hDC*/) dc.SelectBrush(GetSysColorBrush(COLOR_BTNFACE)); wchar_t grptext[500]; - ::GetWindowTextW(m_hWnd, grptext, sizeof(grptext) / sizeof(grptext[0])); + ::GetWindowText(m_hWnd, grptext, sizeof(grptext) / sizeof(grptext[0])); CRect fontsizerect(0, 0, 0, 0); - dc.DrawTextW(grptext, -1, fontsizerect, DT_SINGLELINE | DT_LEFT | DT_CALCRECT); + dc.DrawText(grptext, -1, fontsizerect, DT_SINGLELINE | DT_LEFT | DT_CALCRECT); CRect framerect(controlrect); framerect.top += (fontsizerect.Height()) / 2; @@ -116,6 +116,6 @@ void CPartialGroupBox::OnPaint(HDC /*hDC*/) dc.SetBkMode(OPAQUE); dc.SetBkColor(GetSysColor(COLOR_BTNFACE)); - dc.DrawTextW(grptext, -1, fontrect, DT_SINGLELINE | DT_LEFT); + dc.DrawText(grptext, -1, fontrect, DT_SINGLELINE | DT_LEFT); } } diff --git a/Source/Project64/UserInterface/WelcomeScreen.cpp b/Source/Project64/UserInterface/WelcomeScreen.cpp index 57bd7a9e8..58c627642 100644 --- a/Source/Project64/UserInterface/WelcomeScreen.cpp +++ b/Source/Project64/UserInterface/WelcomeScreen.cpp @@ -20,7 +20,7 @@ void WelcomeScreen::SelectGameDir(UINT /*Code*/, int /*id*/, HWND /*ctl*/) { wchar_t Buffer[MAX_PATH], Directory[MAX_PATH]; LPITEMIDLIST pidl; - BROWSEINFOW bi; + BROWSEINFO bi; stdstr InitialDir = g_Settings->LoadStringVal(RomList_GameDir); std::wstring wTitle = L"Select Game Directory"; @@ -31,9 +31,9 @@ void WelcomeScreen::SelectGameDir(UINT /*Code*/, int /*id*/, HWND /*ctl*/) bi.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS; bi.lpfn = (BFFCALLBACK)SelectDirCallBack; bi.lParam = (DWORD)InitialDir.c_str(); - if ((pidl = SHBrowseForFolderW(&bi)) != NULL) + if ((pidl = SHBrowseForFolder(&bi)) != NULL) { - if (SHGetPathFromIDListW(pidl, Directory)) + if (SHGetPathFromIDList(pidl, Directory)) { stdstr path; CPath SelectedDir(path.FromUTF16(Directory), "");