diff --git a/Application/Application.cpp b/Application/Application.cpp index d8554c33..3bcecffb 100644 --- a/Application/Application.cpp +++ b/Application/Application.cpp @@ -33,8 +33,6 @@ #endif /* -** wWinMain -** ** Entry point. ** */ diff --git a/Library/Dialog.cpp b/Library/Dialog.cpp index 95b5be18..903b3a63 100644 --- a/Library/Dialog.cpp +++ b/Library/Dialog.cpp @@ -19,7 +19,8 @@ #include "StdAfx.h" #include "Dialog.h" -HWND CDialog::c_ActiveDialog = NULL; +HWND CDialog::c_ActiveDialogWindow = NULL; +HWND CDialog::c_ActiveTabWindow = NULL; /* ** Constructor. @@ -51,7 +52,16 @@ CDialog::~CDialog() INT_PTR CDialog::OnActivate(WPARAM wParam, LPARAM lParam) { - c_ActiveDialog = wParam ? m_Window : NULL; + if (wParam) + { + c_ActiveDialogWindow = m_Window; + c_ActiveTabWindow = GetActiveTab().GetWindow(); + } + else + { + c_ActiveDialogWindow = c_ActiveTabWindow = NULL; + } + return FALSE; } @@ -105,6 +115,8 @@ CDialog::CTab::~CTab() */ void CDialog::CTab::Activate() { + c_ActiveTabWindow = m_Window; + if (!m_Initialized) { Initialize(); diff --git a/Library/Dialog.h b/Library/Dialog.h index bb0e79b6..2bb9104f 100644 --- a/Library/Dialog.h +++ b/Library/Dialog.h @@ -24,7 +24,8 @@ class CDialog public: HWND GetWindow() { return m_Window; } - static HWND GetActiveDialog() { return c_ActiveDialog; } + static HWND GetActiveDialogWindow() { return c_ActiveDialogWindow; } + static HWND GetActiveTabWindow() { return c_ActiveTabWindow; } protected: class CTab @@ -48,6 +49,8 @@ protected: CDialog(HWND wnd); virtual ~CDialog(); + virtual CTab& GetActiveTab() = 0; + INT_PTR OnActivate(WPARAM wParam, LPARAM lParam); void SetDialogRTL(); @@ -59,8 +62,9 @@ protected: private: static BOOL CALLBACK SetFontProc(HWND hWnd, LPARAM lParam); - - static HWND c_ActiveDialog; + + static HWND c_ActiveDialogWindow; + static HWND c_ActiveTabWindow; }; #endif diff --git a/Library/DialogAbout.cpp b/Library/DialogAbout.cpp index 56ecba20..183f5900 100644 --- a/Library/DialogAbout.cpp +++ b/Library/DialogAbout.cpp @@ -90,7 +90,7 @@ void CDialogAbout::Open(int tab) if (!c_Dialog) { HINSTANCE instance = Rainmeter->GetResourceInstance(); - HWND owner = Rainmeter->GetTrayWindow()->GetWindow(); + HWND owner = Rainmeter->GetWindow(); if (!CreateDialog(instance, MAKEINTRESOURCE(IDD_ABOUT_DIALOG), owner, DlgProc)) return; } else @@ -148,6 +148,27 @@ void CDialogAbout::UpdateMeasures(CMeterWindow* meterWindow) } } +CDialog::CTab& CDialogAbout::GetActiveTab() +{ + int sel = TabCtrl_GetCurSel(GetDlgItem(m_Window, IDC_ABOUT_TAB)); + if (sel == 0) + { + return m_TabLog; + } + else if (sel == 1) + { + return m_TabSkins; + } + else if (sel == 2) + { + return m_TabPlugins; + } + else // if (sel == 3) + { + return m_TabVersion; + } +} + /* ** Dialog procedure for the About dialog. ** @@ -303,31 +324,15 @@ INT_PTR CDialogAbout::OnNotify(WPARAM wParam, LPARAM lParam) EnableWindow(m_TabPlugins.GetWindow(), FALSE); EnableWindow(m_TabVersion.GetWindow(), FALSE); - int sel = TabCtrl_GetCurSel(nm->hwndFrom); - if (sel == 0) - { - m_TabLog.Activate(); - } - else if (sel == 1) - { - m_TabSkins.Activate(); - } - else if (sel == 2) - { - m_TabPlugins.Activate(); - } - else // if (sel == 3) - { - m_TabVersion.Activate(); - } + GetActiveTab().Activate(); } break; default: - return FALSE; + return 1; } - return TRUE; + return 0; } // ----------------------------------------------------------------------------------------------- @@ -547,11 +552,27 @@ INT_PTR CDialogAbout::CTabLog::OnCommand(WPARAM wParam, LPARAM lParam) } break; + case IDM_COPY: + { + HWND item = GetFocus(); + if (item == GetDlgItem(m_Window, IDC_ABOUTLOG_ITEMS_LISTVIEW)) + { + int sel = ListView_GetNextItem(item, -1, LVNI_FOCUSED | LVNI_SELECTED); + if (sel != -1) + { + std::wstring tmpSz(512, L'0'); + ListView_GetItemText(item, sel, 2, &tmpSz[0], 512); + CSystem::SetClipboardText(tmpSz); + } + } + } + break; + default: - return FALSE; + return 1; } - return TRUE; + return 0; } // ----------------------------------------------------------------------------------------------- @@ -810,11 +831,27 @@ INT_PTR CDialogAbout::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam) } break; + case IDM_COPY: + { + HWND item = GetFocus(); + if (item == GetDlgItem(m_Window, IDC_ABOUTMEASURES_ITEMS_LISTVIEW)) + { + int sel = ListView_GetNextItem(item, -1, LVNI_FOCUSED | LVNI_SELECTED); + if (sel != -1) + { + std::wstring tmpSz(512, L'0'); + ListView_GetItemText(item, sel, 2, &tmpSz[0], 512); + CSystem::SetClipboardText(tmpSz); + } + } + } + break; + default: - return FALSE; + return 1; } - return TRUE; + return 0; } // ----------------------------------------------------------------------------------------------- @@ -1088,10 +1125,10 @@ INT_PTR CDialogAbout::CTabVersion::OnCommand(WPARAM wParam, LPARAM lParam) break; default: - return FALSE; + return 1; } - return TRUE; + return 0; } INT_PTR CDialogAbout::CTabVersion::OnNotify(WPARAM wParam, LPARAM lParam) diff --git a/Library/DialogAbout.h b/Library/DialogAbout.h index 5610922e..79f1652a 100644 --- a/Library/DialogAbout.h +++ b/Library/DialogAbout.h @@ -43,6 +43,9 @@ public: static WINDOWPLACEMENT c_WindowPlacement; static CDialogAbout* c_Dialog; +protected: + virtual CTab& GetActiveTab(); + private: // Log tab class CTabLog : public CTab diff --git a/Library/DialogManage.cpp b/Library/DialogManage.cpp index 5206e3ad..f81902d8 100644 --- a/Library/DialogManage.cpp +++ b/Library/DialogManage.cpp @@ -85,7 +85,7 @@ void CDialogManage::Open(int tab) if (!c_Dialog) { HINSTANCE instance = Rainmeter->GetResourceInstance(); - HWND owner = Rainmeter->GetTrayWindow()->GetWindow(); + HWND owner = Rainmeter->GetWindow(); if (!CreateDialog(instance, MAKEINTRESOURCE(IDD_MANAGE_DIALOG), owner, DlgProc)) return; } else @@ -160,6 +160,23 @@ std::wstring GetTreeSelectionPath(HWND tree) return path; } +CDialog::CTab& CDialogManage::GetActiveTab() +{ + int sel = TabCtrl_GetCurSel(GetDlgItem(m_Window, IDC_MANAGE_TAB)); + if (sel == 0) + { + return m_TabSkins; + } + else if (sel == 1) + { + return m_TabThemes; + } + else // if (sel == 2) + { + return m_TabSettings; + } +} + /* ** Dialog procedure for the Manage dialog. ** @@ -303,27 +320,15 @@ INT_PTR CDialogManage::OnNotify(WPARAM wParam, LPARAM lParam) EnableWindow(m_TabThemes.GetWindow(), FALSE); EnableWindow(m_TabSettings.GetWindow(), FALSE); - int sel = TabCtrl_GetCurSel(nm->hwndFrom); - if (sel == 0) - { - m_TabSkins.Activate(); - } - else if (sel == 1) - { - m_TabThemes.Activate(); - } - else // if (sel == 2) - { - m_TabSettings.Activate(); - } + GetActiveTab().Activate(); } break; default: - return FALSE; + return 1; } - return TRUE; + return 0; } // ----------------------------------------------------------------------------------------------- @@ -1083,7 +1088,7 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam) if (HIWORD(wParam) == CBN_SELCHANGE) { m_IgnoreUpdate = true; - int sel = ComboBox_GetCurSel((HWND)lParam) + ID_CONTEXT_SKINMENU_TRANSPARENCY_0; + int sel = ComboBox_GetCurSel((HWND)lParam) + IDM_SKIN_TRANSPARENCY_0; SendMessage(m_SkinWindow->GetWindow(), WM_COMMAND, sel, 0); } break; @@ -1097,7 +1102,7 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam) } break; - case ID_CONTEXT_MANAGESKINSMENU_EXPAND: + case IDM_MANAGESKINSMENU_EXPAND: { HWND tree = GetDlgItem(m_Window, IDC_MANAGESKINS_SKINS_TREEVIEW); HTREEITEM item = TreeView_GetSelection(tree); @@ -1105,7 +1110,7 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam) } break; - case ID_CONTEXT_MANAGESKINSMENU_OPENFOLDER: + case IDM_MANAGESKINSMENU_OPENFOLDER: { HWND tree = GetDlgItem(m_Window, IDC_MANAGESKINS_SKINS_TREEVIEW); std::wstring command = L'"' + Rainmeter->GetSkinPath(); @@ -1136,8 +1141,8 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam) ++i; } } - else if (wParam == ID_CONTEXT_SKINMENU_MONITOR_AUTOSELECT || - wParam == ID_CONTEXT_SKINMENU_MONITOR_PRIMARY || + else if (wParam == IDM_SKIN_MONITOR_AUTOSELECT || + wParam == IDM_SKIN_MONITOR_PRIMARY || wParam >= ID_MONITOR_FIRST && wParam <= ID_MONITOR_LAST) { if (m_SkinWindow) @@ -1147,10 +1152,10 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam) break; } - return FALSE; + return 1; } - return TRUE; + return 0; } INT_PTR CDialogManage::CTabSkins::OnNotify(WPARAM wParam, LPARAM lParam) @@ -1207,28 +1212,28 @@ INT_PTR CDialogManage::CTabSkins::OnNotify(WPARAM wParam, LPARAM lParam) { // It's a folder subMenu = GetSubMenu(menu, 0); - SetMenuDefaultItem(subMenu, ID_CONTEXT_MANAGESKINSMENU_EXPAND, MF_BYCOMMAND); + SetMenuDefaultItem(subMenu, IDM_MANAGESKINSMENU_EXPAND, MF_BYCOMMAND); if (tvi.state & TVIS_EXPANDED) { mii.dwTypeData = GetString(ID_STR_COLLAPSE); - SetMenuItemInfo(subMenu, ID_CONTEXT_MANAGESKINSMENU_EXPAND, MF_BYCOMMAND, &mii); + SetMenuItemInfo(subMenu, IDM_MANAGESKINSMENU_EXPAND, MF_BYCOMMAND, &mii); } } else { // It's a skin subMenu = GetSubMenu(menu, 1); - SetMenuDefaultItem(subMenu, ID_CONTEXT_MANAGESKINSMENU_LOAD, MF_BYCOMMAND); + SetMenuDefaultItem(subMenu, IDM_MANAGESKINSMENU_LOAD, MF_BYCOMMAND); if (m_SkinWindow) { mii.dwTypeData = GetString(ID_STR_UNLOAD); - SetMenuItemInfo(subMenu, ID_CONTEXT_MANAGESKINSMENU_LOAD, MF_BYCOMMAND, &mii); + SetMenuItemInfo(subMenu, IDM_MANAGESKINSMENU_LOAD, MF_BYCOMMAND, &mii); } else { - EnableMenuItem(subMenu, ID_CONTEXT_MANAGESKINSMENU_REFRESH, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(subMenu, IDM_MANAGESKINSMENU_REFRESH, MF_BYCOMMAND | MF_GRAYED); } } @@ -1580,10 +1585,10 @@ INT_PTR CDialogManage::CTabThemes::OnCommand(WPARAM wParam, LPARAM lParam) break; default: - return FALSE; + return 1; } - return TRUE; + return 0; } // ----------------------------------------------------------------------------------------------- @@ -1707,7 +1712,7 @@ INT_PTR CDialogManage::CTabSettings::OnCommand(WPARAM wParam, LPARAM lParam) } else if (sel == 1) { - Rainmeter->DelayedExecuteCommand(L"!About Measures"); + Rainmeter->DelayedExecuteCommand(L"!About Skins"); } else if (sel == 2) { @@ -1775,8 +1780,8 @@ INT_PTR CDialogManage::CTabSettings::OnCommand(WPARAM wParam, LPARAM lParam) break; default: - return FALSE; + return 1; } - return TRUE; + return 0; } diff --git a/Library/DialogManage.h b/Library/DialogManage.h index 7ebfc387..d86fbe02 100644 --- a/Library/DialogManage.h +++ b/Library/DialogManage.h @@ -41,6 +41,9 @@ public: static WINDOWPLACEMENT c_WindowPlacement; static CDialogManage* c_Dialog; +protected: + virtual CTab& GetActiveTab(); + private: // Skins tab class CTabSkins : public CTab diff --git a/Library/Library.rc b/Library/Library.rc index a2a9da39..8776ca03 100644 --- a/Library/Library.rc +++ b/Library/Library.rc @@ -49,3 +49,13 @@ BEGIN VALUE "Translation", 0x409, 1252 END END + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDR_DIALOG_ACCELERATORS ACCELERATORS +BEGIN + "^C", IDM_COPY +END \ No newline at end of file diff --git a/Library/MeterWindow.cpp b/Library/MeterWindow.cpp index 9f410d08..e64591a4 100644 --- a/Library/MeterWindow.cpp +++ b/Library/MeterWindow.cpp @@ -3406,7 +3406,7 @@ LRESULT CMeterWindow::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam) { try { - if (wParam == ID_CONTEXT_SKINMENU_EDITSKIN) + if (wParam == IDM_SKIN_EDITSKIN) { std::wstring command = m_Rainmeter->GetSkinPath() + m_SkinName; command += L'\\'; @@ -3420,126 +3420,126 @@ LRESULT CMeterWindow::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam) // Execute as admin if in protected location RunCommand(NULL, command.c_str(), SW_SHOWNORMAL, !writable); } - else if (wParam == ID_CONTEXT_SKINMENU_REFRESH) + else if (wParam == IDM_SKIN_REFRESH) { Refresh(false); } - else if (wParam == ID_CONTEXT_SKINMENU_OPENSKINSFOLDER) + else if (wParam == IDM_SKIN_OPENSKINSFOLDER) { std::wstring command = L'"' + m_Rainmeter->GetSkinPath(); command += m_SkinName; command += L'"'; RunCommand(NULL, command.c_str(), SW_SHOWNORMAL); } - else if (wParam == ID_CONTEXT_SKINMENU_MANAGESKIN) + else if (wParam == IDM_SKIN_MANAGESKIN) { CDialogManage::OpenSkin(this); } - else if (wParam == ID_CONTEXT_SKINMENU_VERYTOPMOST) + else if (wParam == IDM_SKIN_VERYTOPMOST) { SetWindowZPosition(ZPOSITION_ONTOPMOST); } - else if (wParam == ID_CONTEXT_SKINMENU_TOPMOST) + else if (wParam == IDM_SKIN_TOPMOST) { SetWindowZPosition(ZPOSITION_ONTOP); } - else if (wParam == ID_CONTEXT_SKINMENU_BOTTOM) + else if (wParam == IDM_SKIN_BOTTOM) { SetWindowZPosition(ZPOSITION_ONBOTTOM); } - else if (wParam == ID_CONTEXT_SKINMENU_NORMAL) + else if (wParam == IDM_SKIN_NORMAL) { SetWindowZPosition(ZPOSITION_NORMAL); } - else if (wParam == ID_CONTEXT_SKINMENU_ONDESKTOP) + else if (wParam == IDM_SKIN_ONDESKTOP) { SetWindowZPosition(ZPOSITION_ONDESKTOP); } - else if (wParam == ID_CONTEXT_SKINMENU_KEEPONSCREEN) + else if (wParam == IDM_SKIN_KEEPONSCREEN) { SetKeepOnScreen(!m_KeepOnScreen); } - else if (wParam == ID_CONTEXT_SKINMENU_CLICKTHROUGH) + else if (wParam == IDM_SKIN_CLICKTHROUGH) { SetClickThrough(!m_ClickThrough); } - else if (wParam == ID_CONTEXT_SKINMENU_DRAGGABLE) + else if (wParam == IDM_SKIN_DRAGGABLE) { SetWindowDraggable(!m_WindowDraggable); } - else if (wParam == ID_CONTEXT_SKINMENU_HIDEONMOUSE) + else if (wParam == IDM_SKIN_HIDEONMOUSE) { SetWindowHide((m_WindowHide == HIDEMODE_NONE) ? HIDEMODE_HIDE : HIDEMODE_NONE); } - else if (wParam == ID_CONTEXT_SKINMENU_TRANSPARENCY_FADEIN) + else if (wParam == IDM_SKIN_TRANSPARENCY_FADEIN) { SetWindowHide((m_WindowHide == HIDEMODE_NONE) ? HIDEMODE_FADEIN : HIDEMODE_NONE); } - else if (wParam == ID_CONTEXT_SKINMENU_TRANSPARENCY_FADEOUT) + else if (wParam == IDM_SKIN_TRANSPARENCY_FADEOUT) { SetWindowHide((m_WindowHide == HIDEMODE_NONE) ? HIDEMODE_FADEOUT : HIDEMODE_NONE); } - else if (wParam == ID_CONTEXT_SKINMENU_REMEMBERPOSITION) + else if (wParam == IDM_SKIN_REMEMBERPOSITION) { SetSavePosition(!m_SavePosition); } - else if (wParam == ID_CONTEXT_SKINMENU_SNAPTOEDGES) + else if (wParam == IDM_SKIN_SNAPTOEDGES) { SetSnapEdges(!m_SnapEdges); } - else if (wParam >= ID_CONTEXT_SKINMENU_TRANSPARENCY_0 && wParam <= ID_CONTEXT_SKINMENU_TRANSPARENCY_90) + else if (wParam >= IDM_SKIN_TRANSPARENCY_0 && wParam <= IDM_SKIN_TRANSPARENCY_90) { - m_AlphaValue = (int)(255.0 - (wParam - ID_CONTEXT_SKINMENU_TRANSPARENCY_0) * (230.0 / (ID_CONTEXT_SKINMENU_TRANSPARENCY_90 - ID_CONTEXT_SKINMENU_TRANSPARENCY_0))); + m_AlphaValue = (int)(255.0 - (wParam - IDM_SKIN_TRANSPARENCY_0) * (230.0 / (IDM_SKIN_TRANSPARENCY_90 - IDM_SKIN_TRANSPARENCY_0))); UpdateTransparency(m_AlphaValue, false); WriteConfig(SETTING_ALPHAVALUE); } - else if (wParam == ID_CONTEXT_CLOSESKIN) + else if (wParam == IDM_CLOSESKIN) { m_Rainmeter->DeactivateConfig(this, -1); } - else if (wParam == ID_CONTEXT_SKINMENU_FROMRIGHT) + else if (wParam == IDM_SKIN_FROMRIGHT) { m_WindowXFromRight = !m_WindowXFromRight; ScreenToWindow(); WriteConfig(SETTING_WINDOWPOSITION); } - else if (wParam == ID_CONTEXT_SKINMENU_FROMBOTTOM) + else if (wParam == IDM_SKIN_FROMBOTTOM) { m_WindowYFromBottom = !m_WindowYFromBottom; ScreenToWindow(); WriteConfig(SETTING_WINDOWPOSITION); } - else if (wParam == ID_CONTEXT_SKINMENU_XPERCENTAGE) + else if (wParam == IDM_SKIN_XPERCENTAGE) { m_WindowXPercentage = !m_WindowXPercentage; ScreenToWindow(); WriteConfig(SETTING_WINDOWPOSITION); } - else if (wParam == ID_CONTEXT_SKINMENU_YPERCENTAGE) + else if (wParam == IDM_SKIN_YPERCENTAGE) { m_WindowYPercentage = !m_WindowYPercentage; ScreenToWindow(); WriteConfig(SETTING_WINDOWPOSITION); } - else if (wParam == ID_CONTEXT_SKINMENU_MONITOR_AUTOSELECT) + else if (wParam == IDM_SKIN_MONITOR_AUTOSELECT) { m_AutoSelectScreen = !m_AutoSelectScreen; ScreenToWindow(); WriteConfig(SETTING_WINDOWPOSITION | SETTING_AUTOSELECTSCREEN); } - else if (wParam == ID_CONTEXT_SKINMENU_MONITOR_PRIMARY || wParam >= ID_MONITOR_FIRST && wParam <= ID_MONITOR_LAST) + else if (wParam == IDM_SKIN_MONITOR_PRIMARY || wParam >= ID_MONITOR_FIRST && wParam <= ID_MONITOR_LAST) { const MULTIMONITOR_INFO& multimonInfo = CSystem::GetMultiMonitorInfo(); const std::vector& monitors = multimonInfo.monitors; int screenIndex; bool screenDefined; - if (wParam == ID_CONTEXT_SKINMENU_MONITOR_PRIMARY) + if (wParam == IDM_SKIN_MONITOR_PRIMARY) { screenIndex = multimonInfo.primary; screenDefined = false; @@ -3570,7 +3570,7 @@ LRESULT CMeterWindow::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam) // Forward to tray window, which handles all the other commands HWND tray = m_Rainmeter->GetTrayWindow()->GetWindow(); - if (wParam == ID_CONTEXT_QUIT) + if (wParam == IDM_QUIT) { PostMessage(tray, WM_COMMAND, wParam, lParam); } diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index 828dc007..50adbb34 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -1032,6 +1032,8 @@ int CRainmeter::MessagePump() MSG msg; BOOL ret; + HACCEL hAccel = LoadAccelerators(m_Instance, MAKEINTRESOURCE(IDR_DIALOG_ACCELERATORS)); + // Run the standard window message loop while ((ret = GetMessage(&msg, NULL, 0, 0)) != 0) { @@ -1039,7 +1041,9 @@ int CRainmeter::MessagePump() { break; } - else if (!CDialog::GetActiveDialog() || !IsDialogMessage(CDialog::GetActiveDialog(), &msg)) + else if (!CDialog::GetActiveDialogWindow() || + !TranslateAccelerator(CDialog::GetActiveTabWindow(), hAccel, &msg) || + !IsDialogMessage(CDialog::GetActiveDialogWindow(), &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); @@ -1908,7 +1912,7 @@ void CRainmeter::ExecuteBang(const std::wstring& name, std::wstring& arg, CMeter else if (_wcsicmp(bang, L"Quit") == 0) { // Quit needs to be delayed since it crashes if done during Update() - PostMessage(GetTrayWindow()->GetWindow(), WM_COMMAND, MAKEWPARAM(ID_CONTEXT_QUIT, 0), (LPARAM)NULL); + PostMessage(GetTrayWindow()->GetWindow(), WM_COMMAND, MAKEWPARAM(IDM_QUIT, 0), (LPARAM)NULL); } else if (_wcsicmp(name.c_str(), L"Execute") == 0) { @@ -2540,22 +2544,22 @@ void CRainmeter::ShowContextMenu(POINT pos, CMeterWindow* meterWindow) HMENU subMenu = GetSubMenu(menu, 0); if (subMenu) { - SetMenuDefaultItem(subMenu, ID_CONTEXT_MANAGE, MF_BYCOMMAND); + SetMenuDefaultItem(subMenu, IDM_MANAGE, MF_BYCOMMAND); if (_waccess(m_LogFile.c_str(), 0) == -1) { - EnableMenuItem(subMenu, ID_CONTEXT_SHOWLOGFILE, MF_BYCOMMAND | MF_GRAYED); - EnableMenuItem(subMenu, ID_CONTEXT_DELETELOGFILE, MF_BYCOMMAND | MF_GRAYED); - EnableMenuItem(subMenu, ID_CONTEXT_STOPLOG, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(subMenu, IDM_SHOWLOGFILE, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(subMenu, IDM_DELETELOGFILE, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(subMenu, IDM_STOPLOG, MF_BYCOMMAND | MF_GRAYED); } else { - EnableMenuItem(subMenu, (m_Logging) ? ID_CONTEXT_STARTLOG : ID_CONTEXT_STOPLOG, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(subMenu, (m_Logging) ? IDM_STARTLOG : IDM_STOPLOG, MF_BYCOMMAND | MF_GRAYED); } if (m_Debug) { - CheckMenuItem(subMenu, ID_CONTEXT_DEBUGLOG, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(subMenu, IDM_DEBUGLOG, MF_BYCOMMAND | MF_CHECKED); } HMENU configMenu = GetSubMenu(subMenu, 4); @@ -2569,7 +2573,7 @@ void CRainmeter::ShowContextMenu(POINT pos, CMeterWindow* meterWindow) if (m_DisableDragging) { - CheckMenuItem(configMenu, ID_CONTEXT_DISABLEDRAG, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(configMenu, IDM_DISABLEDRAG, MF_BYCOMMAND | MF_CHECKED); } } @@ -2611,7 +2615,7 @@ void CRainmeter::ShowContextMenu(POINT pos, CMeterWindow* meterWindow) // Put Update notifications in the Tray menu if (m_NewVersion) { - InsertMenu(subMenu, 0, MF_BYPOSITION, ID_CONTEXT_NEW_VERSION, GetString(ID_STR_UPDATEAVAILABLE)); + InsertMenu(subMenu, 0, MF_BYPOSITION, IDM_NEW_VERSION, GetString(ID_STR_UPDATEAVAILABLE)); HiliteMenuItem(GetTrayWindow()->GetWindow(), subMenu, 0, MF_BYPOSITION | MF_HILITE); InsertMenu(subMenu, 1, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); } @@ -2738,29 +2742,29 @@ HMENU CRainmeter::CreateSkinMenu(CMeterWindow* meterWindow, int index, HMENU con switch (meterWindow->GetWindowZPosition()) { case ZPOSITION_ONDESKTOP: - CheckMenuItem(posMenu, ID_CONTEXT_SKINMENU_ONDESKTOP, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(posMenu, IDM_SKIN_ONDESKTOP, MF_BYCOMMAND | MF_CHECKED); break; case ZPOSITION_ONBOTTOM: - CheckMenuItem(posMenu, ID_CONTEXT_SKINMENU_BOTTOM, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(posMenu, IDM_SKIN_BOTTOM, MF_BYCOMMAND | MF_CHECKED); break; case ZPOSITION_ONTOP: - CheckMenuItem(posMenu, ID_CONTEXT_SKINMENU_TOPMOST, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(posMenu, IDM_SKIN_TOPMOST, MF_BYCOMMAND | MF_CHECKED); break; case ZPOSITION_ONTOPMOST: - CheckMenuItem(posMenu, ID_CONTEXT_SKINMENU_VERYTOPMOST, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(posMenu, IDM_SKIN_VERYTOPMOST, MF_BYCOMMAND | MF_CHECKED); break; default: - CheckMenuItem(posMenu, ID_CONTEXT_SKINMENU_NORMAL, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(posMenu, IDM_SKIN_NORMAL, MF_BYCOMMAND | MF_CHECKED); } - if (meterWindow->GetXFromRight()) CheckMenuItem(posMenu, ID_CONTEXT_SKINMENU_FROMRIGHT, MF_BYCOMMAND | MF_CHECKED); - if (meterWindow->GetYFromBottom()) CheckMenuItem(posMenu, ID_CONTEXT_SKINMENU_FROMBOTTOM, MF_BYCOMMAND | MF_CHECKED); - if (meterWindow->GetXPercentage()) CheckMenuItem(posMenu, ID_CONTEXT_SKINMENU_XPERCENTAGE, MF_BYCOMMAND | MF_CHECKED); - if (meterWindow->GetYPercentage()) CheckMenuItem(posMenu, ID_CONTEXT_SKINMENU_YPERCENTAGE, MF_BYCOMMAND | MF_CHECKED); + if (meterWindow->GetXFromRight()) CheckMenuItem(posMenu, IDM_SKIN_FROMRIGHT, MF_BYCOMMAND | MF_CHECKED); + if (meterWindow->GetYFromBottom()) CheckMenuItem(posMenu, IDM_SKIN_FROMBOTTOM, MF_BYCOMMAND | MF_CHECKED); + if (meterWindow->GetXPercentage()) CheckMenuItem(posMenu, IDM_SKIN_XPERCENTAGE, MF_BYCOMMAND | MF_CHECKED); + if (meterWindow->GetYPercentage()) CheckMenuItem(posMenu, IDM_SKIN_YPERCENTAGE, MF_BYCOMMAND | MF_CHECKED); HMENU monitorMenu = GetSubMenu(posMenu, 0); if (monitorMenu) @@ -2773,7 +2777,7 @@ HMENU CRainmeter::CreateSkinMenu(CMeterWindow* meterWindow, int index, HMENU con if (!meterWindow->GetNativeTransparency()) { EnableMenuItem(settingsMenu, 1, MF_BYPOSITION | MF_GRAYED); // "Transparency" menu - EnableMenuItem(settingsMenu, ID_CONTEXT_SKINMENU_CLICKTHROUGH, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(settingsMenu, IDM_SKIN_CLICKTHROUGH, MF_BYCOMMAND | MF_GRAYED); } else { @@ -2788,18 +2792,18 @@ HMENU CRainmeter::CreateSkinMenu(CMeterWindow* meterWindow, int index, HMENU con switch (meterWindow->GetWindowHide()) { case HIDEMODE_FADEIN: - CheckMenuItem(alphaMenu, ID_CONTEXT_SKINMENU_TRANSPARENCY_FADEIN, MF_BYCOMMAND | MF_CHECKED); - EnableMenuItem(alphaMenu, ID_CONTEXT_SKINMENU_TRANSPARENCY_FADEOUT, MF_BYCOMMAND | MF_GRAYED); + CheckMenuItem(alphaMenu, IDM_SKIN_TRANSPARENCY_FADEIN, MF_BYCOMMAND | MF_CHECKED); + EnableMenuItem(alphaMenu, IDM_SKIN_TRANSPARENCY_FADEOUT, MF_BYCOMMAND | MF_GRAYED); break; case HIDEMODE_FADEOUT: - CheckMenuItem(alphaMenu, ID_CONTEXT_SKINMENU_TRANSPARENCY_FADEOUT, MF_BYCOMMAND | MF_CHECKED); - EnableMenuItem(alphaMenu, ID_CONTEXT_SKINMENU_TRANSPARENCY_FADEIN, MF_BYCOMMAND | MF_GRAYED); + CheckMenuItem(alphaMenu, IDM_SKIN_TRANSPARENCY_FADEOUT, MF_BYCOMMAND | MF_CHECKED); + EnableMenuItem(alphaMenu, IDM_SKIN_TRANSPARENCY_FADEIN, MF_BYCOMMAND | MF_GRAYED); break; case HIDEMODE_HIDE: - EnableMenuItem(alphaMenu, ID_CONTEXT_SKINMENU_TRANSPARENCY_FADEIN, MF_BYCOMMAND | MF_GRAYED); - EnableMenuItem(alphaMenu, ID_CONTEXT_SKINMENU_TRANSPARENCY_FADEOUT, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(alphaMenu, IDM_SKIN_TRANSPARENCY_FADEIN, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(alphaMenu, IDM_SKIN_TRANSPARENCY_FADEOUT, MF_BYCOMMAND | MF_GRAYED); break; } } @@ -2809,49 +2813,49 @@ HMENU CRainmeter::CreateSkinMenu(CMeterWindow* meterWindow, int index, HMENU con switch (meterWindow->GetWindowHide()) { case HIDEMODE_HIDE: - CheckMenuItem(settingsMenu, ID_CONTEXT_SKINMENU_HIDEONMOUSE, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(settingsMenu, IDM_SKIN_HIDEONMOUSE, MF_BYCOMMAND | MF_CHECKED); break; case HIDEMODE_FADEIN: case HIDEMODE_FADEOUT: - EnableMenuItem(settingsMenu, ID_CONTEXT_SKINMENU_HIDEONMOUSE, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(settingsMenu, IDM_SKIN_HIDEONMOUSE, MF_BYCOMMAND | MF_GRAYED); break; } if (meterWindow->GetSnapEdges()) { - CheckMenuItem(settingsMenu, ID_CONTEXT_SKINMENU_SNAPTOEDGES, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(settingsMenu, IDM_SKIN_SNAPTOEDGES, MF_BYCOMMAND | MF_CHECKED); } if (meterWindow->GetSavePosition()) { - CheckMenuItem(settingsMenu, ID_CONTEXT_SKINMENU_REMEMBERPOSITION, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(settingsMenu, IDM_SKIN_REMEMBERPOSITION, MF_BYCOMMAND | MF_CHECKED); } if (m_DisableDragging) { - EnableMenuItem(settingsMenu, ID_CONTEXT_SKINMENU_DRAGGABLE, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(settingsMenu, IDM_SKIN_DRAGGABLE, MF_BYCOMMAND | MF_GRAYED); } else if (meterWindow->GetWindowDraggable()) { - CheckMenuItem(settingsMenu, ID_CONTEXT_SKINMENU_DRAGGABLE, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(settingsMenu, IDM_SKIN_DRAGGABLE, MF_BYCOMMAND | MF_CHECKED); } if (meterWindow->GetClickThrough()) { - CheckMenuItem(settingsMenu, ID_CONTEXT_SKINMENU_CLICKTHROUGH, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(settingsMenu, IDM_SKIN_CLICKTHROUGH, MF_BYCOMMAND | MF_CHECKED); } if (meterWindow->GetKeepOnScreen()) { - CheckMenuItem(settingsMenu, ID_CONTEXT_SKINMENU_KEEPONSCREEN, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(settingsMenu, IDM_SKIN_KEEPONSCREEN, MF_BYCOMMAND | MF_CHECKED); } } // Add the name of the Skin to the menu const std::wstring& skinName = meterWindow->GetSkinName(); - ModifyMenu(skinMenu, ID_CONTEXT_SKINMENU_OPENSKINSFOLDER, MF_BYCOMMAND, ID_CONTEXT_SKINMENU_OPENSKINSFOLDER, skinName.c_str()); - SetMenuDefaultItem(skinMenu, ID_CONTEXT_SKINMENU_OPENSKINSFOLDER, FALSE); + ModifyMenu(skinMenu, IDM_SKIN_OPENSKINSFOLDER, MF_BYCOMMAND, IDM_SKIN_OPENSKINSFOLDER, skinName.c_str()); + SetMenuDefaultItem(skinMenu, IDM_SKIN_OPENSKINSFOLDER, FALSE); // Remove dummy menuitem from the variants menu HMENU variantsMenu = GetSubMenu(skinMenu, 2); @@ -2956,7 +2960,7 @@ void CRainmeter::CreateMonitorMenu(HMENU monitorMenu, CMeterWindow* meterWindow) // Tick the configs if (!screenDefined) { - CheckMenuItem(monitorMenu, ID_CONTEXT_SKINMENU_MONITOR_PRIMARY, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(monitorMenu, IDM_SKIN_MONITOR_PRIMARY, MF_BYCOMMAND | MF_CHECKED); } if (screenDefined && screenIndex == 0) @@ -2966,7 +2970,7 @@ void CRainmeter::CreateMonitorMenu(HMENU monitorMenu, CMeterWindow* meterWindow) if (meterWindow->GetAutoSelectScreen()) { - CheckMenuItem(monitorMenu, ID_CONTEXT_SKINMENU_MONITOR_AUTOSELECT, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(monitorMenu, IDM_SKIN_MONITOR_AUTOSELECT, MF_BYCOMMAND | MF_CHECKED); } } diff --git a/Library/TrayWindow.cpp b/Library/TrayWindow.cpp index 5e8b81e4..3353b9cc 100644 --- a/Library/TrayWindow.cpp +++ b/Library/TrayWindow.cpp @@ -416,27 +416,27 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA case WM_COMMAND: if (tray) { - if (wParam == ID_CONTEXT_MANAGE) + if (wParam == IDM_MANAGE) { CDialogManage::Open(); } - else if (wParam == ID_CONTEXT_ABOUT) + else if (wParam == IDM_ABOUT) { CDialogAbout::Open(); } - else if (wParam == ID_CONTEXT_SHOW_HELP) + else if (wParam == IDM_SHOW_HELP) { RunCommand(NULL, RAINMETER_HELP, SW_SHOWNORMAL); } - else if (wParam == ID_CONTEXT_NEW_VERSION) + else if (wParam == IDM_NEW_VERSION) { RunCommand(NULL, RAINMETER_OFFICIAL, SW_SHOWNORMAL); } - else if (wParam == ID_CONTEXT_REFRESH) + else if (wParam == IDM_REFRESH) { PostMessage(Rainmeter->GetWindow(), WM_RAINMETER_DELAYED_REFRESH_ALL, (WPARAM)NULL, (LPARAM)NULL); } - else if (wParam == ID_CONTEXT_SHOWLOGFILE) + else if (wParam == IDM_SHOWLOGFILE) { // Check if the file exists const std::wstring& log = Rainmeter->GetLogFile(); @@ -446,38 +446,38 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA RunCommand(tray->GetWindow(), command.c_str(), SW_SHOWNORMAL); } } - else if (wParam == ID_CONTEXT_STARTLOG) + else if (wParam == IDM_STARTLOG) { Rainmeter->StartLogging(); } - else if (wParam == ID_CONTEXT_STOPLOG) + else if (wParam == IDM_STOPLOG) { Rainmeter->StopLogging(); } - else if (wParam == ID_CONTEXT_DELETELOGFILE) + else if (wParam == IDM_DELETELOGFILE) { Rainmeter->DeleteLogFile(); } - else if (wParam == ID_CONTEXT_DEBUGLOG) + else if (wParam == IDM_DEBUGLOG) { Rainmeter->SetDebug(!Rainmeter->GetDebug()); } - else if (wParam == ID_CONTEXT_DISABLEDRAG) + else if (wParam == IDM_DISABLEDRAG) { Rainmeter->SetDisableDragging(!Rainmeter->GetDisableDragging()); } - else if (wParam == ID_CONTEXT_EDITCONFIG) + else if (wParam == IDM_EDITCONFIG) { std::wstring command = Rainmeter->GetConfigEditor() + L" \""; command += Rainmeter->GetIniFile(); command += L'"'; RunCommand(tray->GetWindow(), command.c_str(), SW_SHOWNORMAL); } - else if (wParam == ID_CONTEXT_QUIT) + else if (wParam == IDM_QUIT) { PostQuitMessage(0); } - else if (wParam == ID_CONTEXT_OPENSKINSFOLDER) + else if (wParam == IDM_OPENSKINSFOLDER) { std::wstring command = L'"' + Rainmeter->GetSkinPath(); command += L'"'; diff --git a/Library/resource.h b/Library/resource.h index b6949301..45a3bcda 100644 --- a/Library/resource.h +++ b/Library/resource.h @@ -17,6 +17,7 @@ #define IDD_MANAGESKINS_DIALOG 111 #define IDD_MANAGETHEMES_DIALOG 112 #define IDD_MANAGESETTINGS_DIALOG 113 +#define IDR_DIALOG_ACCELERATORS 114 #define IDC_ABOUT_TAB 1000 #define IDC_ABOUT_VERSION_TEXT 1001 @@ -43,9 +44,9 @@ #define IDC_MANAGESKINS_SKINS_TREEVIEW 1022 #define IDC_MANAGESKINS_FILE_TEXT 1023 #define IDC_MANAGESKINS_CONFIG_TEXT 1024 -#define IDC_MANAGESKINS_LOAD_BUTTON 4056 // ID_CONTEXT_MANAGESKINSMENU_LOAD -#define IDC_MANAGESKINS_REFRESH_BUTTON 4057 // ID_CONTEXT_MANAGESKINSMENU_REFRESH -#define IDC_MANAGESKINS_EDIT_BUTTON 4058 // ID_CONTEXT_MANAGESKINSMENU_EDIT +#define IDC_MANAGESKINS_LOAD_BUTTON 4056 // IDM_MANAGESKINSMENU_LOAD +#define IDC_MANAGESKINS_REFRESH_BUTTON 4057 // IDM_MANAGESKINSMENU_REFRESH +#define IDC_MANAGESKINS_EDIT_BUTTON 4058 // IDM_MANAGESKINSMENU_EDIT #define IDC_MANAGESKINS_AUTHOR_TEXT 1025 #define IDC_MANAGESKINS_VERSION_TEXT 1026 #define IDC_MANAGESKINS_LICENSE_TEXT 1027 @@ -130,60 +131,61 @@ #define ID_STR_INCLUDEINFINITELOOP 2045 #define ID_STR_ABOUTRAINMETER 2046 -#define ID_CONTEXT_REFRESH 4001 -#define ID_CONTEXT_QUIT 4002 -#define ID_CONTEXT_DISABLEDRAG 4003 -#define ID_CONTEXT_MANAGE 4004 -#define ID_CONTEXT_ABOUT 4005 -#define ID_CONTEXT_CONFIGS_DEFAULT 4006 -#define ID_CONTEXT_EDITCONFIG 4008 -#define ID_CONTEXT_CLOSESKIN 4009 -#define ID_CONTEXT_SKINMENU_TOPMOST 4010 -#define ID_CONTEXT_SKINMENU_NORMAL 4011 -#define ID_CONTEXT_SKINMENU_BOTTOM 4012 -#define ID_CONTEXT_SKINMENU_TRANSPARENCY_0 4014 -#define ID_CONTEXT_SKINMENU_TRANSPARENCY_10 4015 -#define ID_CONTEXT_SKINMENU_TRANSPARENCY_20 4016 -#define ID_CONTEXT_SKINMENU_TRANSPARENCY_30 4017 -#define ID_CONTEXT_SKINMENU_TRANSPARENCY_40 4018 -#define ID_CONTEXT_SKINMENU_TRANSPARENCY_50 4019 -#define ID_CONTEXT_SKINMENU_TRANSPARENCY_60 4020 -#define ID_CONTEXT_SKINMENU_TRANSPARENCY_70 4021 -#define ID_CONTEXT_SKINMENU_TRANSPARENCY_80 4022 -#define ID_CONTEXT_SKINMENU_TRANSPARENCY_90 4023 -#define ID_CONTEXT_SKINMENU_REFRESH 4024 -#define ID_CONTEXT_SKINMENU_HIDEONMOUSE 4025 -#define ID_CONTEXT_SKINMENU_DRAGGABLE 4026 -#define ID_CONTEXT_SKINMENU_REMEMBERPOSITION 4027 -#define ID_CONTEXT_SKINMENU_SNAPTOEDGES 4028 -#define ID_CONTEXT_SKINMENU_CLICKTHROUGH 4029 -#define ID_CONTEXT_SKINMENU_EDITSKIN 4030 -#define ID_CONTEXT_SKINMENU_VERYTOPMOST 4031 -#define ID_CONTEXT_SKINMENU_ONDESKTOP 4032 -#define ID_CONTEXT_SHOW_HELP 4034 -#define ID_CONTEXT_SHOWLOGFILE 4035 -#define ID_CONTEXT_SKINMENU_TRANSPARENCY_FADEIN 4037 -#define ID_CONTEXT_SKINMENU_TRANSPARENCY_FADEOUT 4038 -#define ID_CONTEXT_SKINMENU_KEEPONSCREEN 4039 -#define ID_CONTEXT_SKINMENU_FROMRIGHT 4040 -#define ID_CONTEXT_SKINMENU_FROMBOTTOM 4041 -#define ID_CONTEXT_SKINMENU_XPERCENTAGE 4042 -#define ID_CONTEXT_SKINMENU_YPERCENTAGE 4043 -#define ID_CONTEXT_OPENSKINSFOLDER 4044 -#define ID_CONTEXT_SKINMENU_OPENSKINSFOLDER 4045 -#define ID_CONTEXT_SKINMENU_MONITOR_PRIMARY 4046 -#define ID_CONTEXT_SKINMENU_MONITOR_AUTOSELECT 4047 -#define ID_CONTEXT_NEW_VERSION 4048 -#define ID_CONTEXT_STARTLOG 4049 -#define ID_CONTEXT_STOPLOG 4050 -#define ID_CONTEXT_DEBUGLOG 4051 -#define ID_CONTEXT_DELETELOGFILE 4052 -#define ID_CONTEXT_SKINMENU_MANAGESKIN 4053 -#define ID_CONTEXT_MANAGESKINSMENU_EXPAND 4054 -#define ID_CONTEXT_MANAGESKINSMENU_OPENFOLDER 4055 -#define ID_CONTEXT_MANAGESKINSMENU_LOAD 4056 -#define ID_CONTEXT_MANAGESKINSMENU_REFRESH 4057 -#define ID_CONTEXT_MANAGESKINSMENU_EDIT 4058 +#define IDM_REFRESH 4001 +#define IDM_QUIT 4002 +#define IDM_DISABLEDRAG 4003 +#define IDM_MANAGE 4004 +#define IDM_ABOUT 4005 +#define IDM_CONFIGS_DEFAULT 4006 +#define IDM_EDITCONFIG 4008 +#define IDM_CLOSESKIN 4009 +#define IDM_SKIN_TOPMOST 4010 +#define IDM_SKIN_NORMAL 4011 +#define IDM_SKIN_BOTTOM 4012 +#define IDM_SKIN_TRANSPARENCY_0 4014 +#define IDM_SKIN_TRANSPARENCY_10 4015 +#define IDM_SKIN_TRANSPARENCY_20 4016 +#define IDM_SKIN_TRANSPARENCY_30 4017 +#define IDM_SKIN_TRANSPARENCY_40 4018 +#define IDM_SKIN_TRANSPARENCY_50 4019 +#define IDM_SKIN_TRANSPARENCY_60 4020 +#define IDM_SKIN_TRANSPARENCY_70 4021 +#define IDM_SKIN_TRANSPARENCY_80 4022 +#define IDM_SKIN_TRANSPARENCY_90 4023 +#define IDM_SKIN_REFRESH 4024 +#define IDM_SKIN_HIDEONMOUSE 4025 +#define IDM_SKIN_DRAGGABLE 4026 +#define IDM_SKIN_REMEMBERPOSITION 4027 +#define IDM_SKIN_SNAPTOEDGES 4028 +#define IDM_SKIN_CLICKTHROUGH 4029 +#define IDM_SKIN_EDITSKIN 4030 +#define IDM_SKIN_VERYTOPMOST 4031 +#define IDM_SKIN_ONDESKTOP 4032 +#define IDM_SHOW_HELP 4034 +#define IDM_SHOWLOGFILE 4035 +#define IDM_SKIN_TRANSPARENCY_FADEIN 4037 +#define IDM_SKIN_TRANSPARENCY_FADEOUT 4038 +#define IDM_SKIN_KEEPONSCREEN 4039 +#define IDM_SKIN_FROMRIGHT 4040 +#define IDM_SKIN_FROMBOTTOM 4041 +#define IDM_SKIN_XPERCENTAGE 4042 +#define IDM_SKIN_YPERCENTAGE 4043 +#define IDM_OPENSKINSFOLDER 4044 +#define IDM_SKIN_OPENSKINSFOLDER 4045 +#define IDM_SKIN_MONITOR_PRIMARY 4046 +#define IDM_SKIN_MONITOR_AUTOSELECT 4047 +#define IDM_NEW_VERSION 4048 +#define IDM_STARTLOG 4049 +#define IDM_STOPLOG 4050 +#define IDM_DEBUGLOG 4051 +#define IDM_DELETELOGFILE 4052 +#define IDM_SKIN_MANAGESKIN 4053 +#define IDM_MANAGESKINSMENU_EXPAND 4054 +#define IDM_MANAGESKINSMENU_OPENFOLDER 4055 +#define IDM_MANAGESKINSMENU_LOAD 4056 +#define IDM_MANAGESKINSMENU_REFRESH 4057 +#define IDM_MANAGESKINSMENU_EDIT 4058 +#define IDM_COPY 4059 #define ID_CONFIG_EDIT 30000 #define ID_CONFIG_FIRST 30001 diff --git a/SkinInstaller/Application.cpp b/SkinInstaller/Application.cpp index 7edc3621..66e91964 100644 --- a/SkinInstaller/Application.cpp +++ b/SkinInstaller/Application.cpp @@ -26,6 +26,7 @@ GLOBALDATA g_Data; /* ** Entry point +** */ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) { diff --git a/SkinInstaller/DialogBackup.cpp b/SkinInstaller/DialogBackup.cpp index f0a30b0d..a1802af0 100644 --- a/SkinInstaller/DialogBackup.cpp +++ b/SkinInstaller/DialogBackup.cpp @@ -29,8 +29,6 @@ extern GLOBALDATA g_Data; CDialogBackup* CDialogBackup::c_Dialog = NULL; /* -** CDialogBackup -** ** Constructor. ** */ @@ -43,8 +41,6 @@ CDialogBackup::CDialogBackup(HWND wnd) : CDialog(wnd), } /* -** ~CDialogBackup -** ** Destructor. ** */ @@ -53,8 +49,6 @@ CDialogBackup::~CDialogBackup() } /* -** Create -** ** Creates the dialog. ** */ @@ -63,9 +57,12 @@ void CDialogBackup::Create(HINSTANCE hInstance, LPWSTR lpCmdLine) DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_BACKUP_DIALOG), NULL, (DLGPROC)DlgProc, (LPARAM)lpCmdLine); } +CDialog::CTab& CDialogBackup::GetActiveTab() +{ + return m_TabBackup; +} + /* -** DlgProc -** ** Dialog procedure for the About dialog. ** */ @@ -404,8 +401,6 @@ bool CDialogBackup::AddFolderToBackup(const std::wstring& path, std::wstring bas // ----------------------------------------------------------------------------------------------- /* -** CTabBackup -** ** Constructor. ** */ @@ -414,8 +409,6 @@ CDialogBackup::CTabBackup::CTabBackup(HWND wnd) : CTab(GetModuleHandle(NULL), wn } /* -** Initialize -** ** Called when tab is displayed. ** */ @@ -439,8 +432,6 @@ void CDialogBackup::CTabBackup::Initialize() } /* -** DlgProc -** ** Dialog procedure for the Version tab. ** */ diff --git a/SkinInstaller/DialogBackup.h b/SkinInstaller/DialogBackup.h index 9e394f65..ba55d775 100644 --- a/SkinInstaller/DialogBackup.h +++ b/SkinInstaller/DialogBackup.h @@ -34,6 +34,9 @@ public: static CDialogBackup* c_Dialog; +protected: + virtual CTab& GetActiveTab(); + private: class CTabBackup : public CTab {