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)
|
if (wParam)
|
||||||
{
|
{
|
||||||
c_ActiveDialogWindow = m_Window;
|
c_ActiveDialogWindow = m_Window;
|
||||||
c_ActiveTabWindow = GetActiveTab().GetWindow();
|
c_ActiveTabWindow = GetActiveWindow();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -65,18 +65,18 @@ INT_PTR CDialog::OnActivate(WPARAM wParam, LPARAM lParam)
|
|||||||
return FALSE;
|
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.
|
** 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);
|
CDialog(HWND wnd);
|
||||||
virtual ~CDialog();
|
virtual ~CDialog();
|
||||||
|
|
||||||
virtual CTab& GetActiveTab() = 0;
|
virtual HWND GetActiveWindow() { return m_Window; }
|
||||||
|
|
||||||
INT_PTR OnActivate(WPARAM wParam, LPARAM lParam);
|
INT_PTR OnActivate(WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
void SetDialogRTL();
|
void SetDialogRTL(HWND window);
|
||||||
void SetDialogFont();
|
void SetDialogRTL() { SetDialogRTL(m_Window); }
|
||||||
|
|
||||||
|
void SetDialogFont(HWND window);
|
||||||
|
void SetDialogFont() { SetDialogFont(m_Window); }
|
||||||
|
|
||||||
HWND m_Window;
|
HWND m_Window;
|
||||||
HFONT m_Font;
|
HFONT m_Font;
|
||||||
|
@ -44,7 +44,7 @@ public:
|
|||||||
static CDialogAbout* c_Dialog;
|
static CDialogAbout* c_Dialog;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CTab& GetActiveTab();
|
virtual HWND GetActiveWindow() { return GetActiveTab().GetWindow(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Log tab
|
// Log tab
|
||||||
@ -119,6 +119,8 @@ private:
|
|||||||
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CTab& GetActiveTab();
|
||||||
|
|
||||||
CTabLog m_TabLog;
|
CTabLog m_TabLog;
|
||||||
CTabSkins m_TabSkins;
|
CTabSkins m_TabSkins;
|
||||||
CTabPlugins m_TabPlugins;
|
CTabPlugins m_TabPlugins;
|
||||||
|
@ -42,7 +42,7 @@ public:
|
|||||||
static CDialogManage* c_Dialog;
|
static CDialogManage* c_Dialog;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CTab& GetActiveTab();
|
virtual HWND GetActiveWindow() { return GetActiveTab().GetWindow(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Skins tab
|
// Skins tab
|
||||||
@ -101,6 +101,8 @@ private:
|
|||||||
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CTab& GetActiveTab();
|
||||||
|
|
||||||
CTabSkins m_TabSkins;
|
CTabSkins m_TabSkins;
|
||||||
CTabThemes m_TabThemes;
|
CTabThemes m_TabThemes;
|
||||||
CTabSettings m_TabSettings;
|
CTabSettings m_TabSettings;
|
||||||
|
Loading…
Reference in New Issue
Block a user