Skip to content

Commit

Permalink
mica in about box
Browse files Browse the repository at this point in the history
  • Loading branch information
rounk-ctrl committed Feb 11, 2022
1 parent 323763a commit be811b4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 28 deletions.
15 changes: 2 additions & 13 deletions MicaForEveryone/MicaForEveryone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,6 @@ void ShowContextMenu(HWND hwnd, POINT pt)
ApplyNoMaterial(hwnds);
}
}
if (IDM_GUI == menuItemId)
{
ShowWindow(hwnd, SW_SHOW);
}

DestroyMenu(hMenu);
}
Expand Down Expand Up @@ -365,19 +361,13 @@ VOID CALLBACK WinEventProcCallback(HWINEVENTHOOK hWinEventHook, DWORD dwEvent, H
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HBRUSH hBrush;
hBrush = CreateSolidBrush(RGB(0, 0, 0));
HBRUSH brush = CreateSolidBrush(darkBkColor);
RtlGetVersion(&os);
static UINT s_uTaskbarRestart;
switch (message)
{
case WM_CREATE:
{
AllowDarkModeForWindow(hWnd, true);
ApplyDarkTitleBar(hWnd, TRUE);
DwmExtendFrameIntoClientArea(hWnd, &margins);
ApplyMica(hWnd);
hEvent = SetWinEventHook(EVENT_OBJECT_CREATE, EVENT_OBJECT_CREATE, NULL,
WinEventProcCallback, 0, 0, WINEVENT_OUTOFCONTEXT | WINEVENT_SKIPOWNTHREAD);
s_uTaskbarRestart = RegisterWindowMessage(TEXT("TaskbarCreated"));
Expand All @@ -397,9 +387,6 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
EnumWindows(hwndcallback, reinterpret_cast<LPARAM>(&hwndlist));
ShowContextMenu(hWnd, ok);
return TRUE;
case WM_LBUTTONDOWN:
ShowWindow(hWnd, SW_SHOW);
return TRUE;
}
case WM_COMMAND:
{
Expand Down Expand Up @@ -473,6 +460,8 @@ INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
case WM_INITDIALOG:
{
DwmExtendFrameIntoClientArea(hDlg, &margins);
ApplyMica(hDlg);
SetWindowTheme(GetDlgItem(hDlg, IDOK), L"Explorer", nullptr);
SendMessageW(hDlg, WM_THEMECHANGED, 0, 0);
HFONT hOrigFont = (HFONT)SendMessage(GetDlgItem(hDlg, IDC_STATIC_LINK), WM_GETFONT, 0, 0);
Expand Down
Binary file modified MicaForEveryone/MicaForEveryone.rc
Binary file not shown.
8 changes: 0 additions & 8 deletions MicaForEveryone/MicaForEveryoneHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ HICON hMainIcon;
// point used to spawn the menu where your cursor is
POINT ok;

HWND Title;
HFONT hFontBold;
HFONT hFont;
HWND hWndComboBox;
HWND TitleBarText;
HWND ColorText;
HWND ExtendText;


BOOL ApplyDarkTitleBar(HWND hwnd, BOOL mode)
{
Expand Down
7 changes: 0 additions & 7 deletions MicaForEveryone/MicaForEveryoneHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ extern UINT menuItemId;
extern HICON hMainIcon;
extern POINT ok;

extern HWND Title;
extern HFONT hFontBold;
extern HFONT hFont;
extern HWND hWndComboBox;
extern HWND TitleBarText;
extern HWND ColorText;
extern HWND ExtendText;

BOOL ApplyDarkTitleBar(HWND hwnd, BOOL mode);
BOOL CobaltMicaEffect(HWND hwnd, BOOL allow);
Expand Down

0 comments on commit be811b4

Please sign in to comment.