mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Minor changes to dialog classes
This commit is contained in:
parent
20d3910e91
commit
a7a74dda69
@ -55,7 +55,7 @@ INT_PTR CDialog::OnActivate(WPARAM wParam, LPARAM lParam)
|
||||
if (wParam)
|
||||
{
|
||||
c_ActiveDialogWindow = m_Window;
|
||||
c_ActiveTabWindow = GetActiveTab().GetWindow();
|
||||
c_ActiveTabWindow = GetActiveWindow();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -65,18 +65,18 @@ INT_PTR CDialog::OnActivate(WPARAM wParam, LPARAM lParam)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void CDialog::SetDialogRTL()
|
||||
void CDialog::SetDialogRTL(HWND window)
|
||||
{
|
||||
SetWindowLongPtr(m_Window, GWL_EXSTYLE, GetWindowLongPtr(m_Window, GWL_EXSTYLE) | WS_EX_LAYOUTRTL);
|
||||
SetWindowLongPtr(window, GWL_EXSTYLE, GetWindowLongPtr(window, GWL_EXSTYLE) | WS_EX_LAYOUTRTL);
|
||||
}
|
||||
|
||||
/*
|
||||
** Sets dialog font to UI font.
|
||||
**
|
||||
*/
|
||||
void CDialog::SetDialogFont()
|
||||
void CDialog::SetDialogFont(HWND window)
|
||||
{
|
||||
EnumChildWindows(m_Window, SetFontProc, (WPARAM)m_Font);
|
||||
EnumChildWindows(window, SetFontProc, (WPARAM)m_Font);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -49,12 +49,15 @@ protected:
|
||||
CDialog(HWND wnd);
|
||||
virtual ~CDialog();
|
||||
|
||||
virtual CTab& GetActiveTab() = 0;
|
||||
virtual HWND GetActiveWindow() { return m_Window; }
|
||||
|
||||
INT_PTR OnActivate(WPARAM wParam, LPARAM lParam);
|
||||
|
||||
void SetDialogRTL();
|
||||
void SetDialogFont();
|
||||
void SetDialogRTL(HWND window);
|
||||
void SetDialogRTL() { SetDialogRTL(m_Window); }
|
||||
|
||||
void SetDialogFont(HWND window);
|
||||
void SetDialogFont() { SetDialogFont(m_Window); }
|
||||
|
||||
HWND m_Window;
|
||||
HFONT m_Font;
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
static CDialogAbout* c_Dialog;
|
||||
|
||||
protected:
|
||||
virtual CTab& GetActiveTab();
|
||||
virtual HWND GetActiveWindow() { return GetActiveTab().GetWindow(); }
|
||||
|
||||
private:
|
||||
// Log tab
|
||||
@ -119,6 +119,8 @@ private:
|
||||
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
};
|
||||
|
||||
CTab& GetActiveTab();
|
||||
|
||||
CTabLog m_TabLog;
|
||||
CTabSkins m_TabSkins;
|
||||
CTabPlugins m_TabPlugins;
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
static CDialogManage* c_Dialog;
|
||||
|
||||
protected:
|
||||
virtual CTab& GetActiveTab();
|
||||
virtual HWND GetActiveWindow() { return GetActiveTab().GetWindow(); }
|
||||
|
||||
private:
|
||||
// Skins tab
|
||||
@ -101,6 +101,8 @@ private:
|
||||
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
};
|
||||
|
||||
CTab& GetActiveTab();
|
||||
|
||||
CTabSkins m_TabSkins;
|
||||
CTabThemes m_TabThemes;
|
||||
CTabSettings m_TabSettings;
|
||||
|
Loading…
Reference in New Issue
Block a user