Settings: Use images in PNG format

It makes StartmenuDLL.dll ~830kB smaller.
This commit is contained in:
ge0rdi
2020-08-29 15:18:41 +02:00
parent ee59bb76de
commit 6242e8d9b9
14 changed files with 11 additions and 13 deletions

View File

@@ -3718,7 +3718,6 @@ protected:
CWindow m_ImageClassic1, m_ImageClassic2, m_ImageWin7;
CWindow m_Tooltip;
CWindow m_ButtonAero, m_ButtonClassic, m_ButtonCustom;
bool m_bLargeBitmaps;
HICON m_hIcon;
CString m_IconPath;
@@ -3737,14 +3736,13 @@ LRESULT CMenuStyleDlg::OnInitDialog( UINT uMsg, WPARAM wParam, LPARAM lParam, BO
HDC hdc=::GetDC(NULL);
int dpi=GetDeviceCaps(hdc,LOGPIXELSY);
::ReleaseDC(NULL,hdc);
m_bLargeBitmaps=dpi>=144;
if (m_bLargeBitmaps)
bool bLargeBitmaps=dpi>=144;
{
HBITMAP bmp=(HBITMAP)LoadImage(g_Instance,MAKEINTRESOURCE(IDB_STYLE_CLASSIC1150),IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION);
HBITMAP bmp=LoadImageResource(g_Instance,MAKEINTRESOURCE(bLargeBitmaps?IDB_STYLE_CLASSIC1150:IDB_STYLE_CLASSIC1),true,true);
m_ImageClassic1.SendMessage(STM_SETIMAGE,IMAGE_BITMAP,(LPARAM)bmp);
bmp=(HBITMAP)LoadImage(g_Instance,MAKEINTRESOURCE(IDB_STYLE_CLASSIC2150),IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION);
bmp=LoadImageResource(g_Instance,MAKEINTRESOURCE(bLargeBitmaps?IDB_STYLE_CLASSIC2150:IDB_STYLE_CLASSIC2),true,true);
m_ImageClassic2.SendMessage(STM_SETIMAGE,IMAGE_BITMAP,(LPARAM)bmp);
bmp=(HBITMAP)LoadImage(g_Instance,MAKEINTRESOURCE(IDB_STYLE_WIN7150),IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION);
bmp=LoadImageResource(g_Instance,MAKEINTRESOURCE(bLargeBitmaps?IDB_STYLE_WIN7150:IDB_STYLE_WIN7),true,true);
m_ImageWin7.SendMessage(STM_SETIMAGE,IMAGE_BITMAP,(LPARAM)bmp);
}
@@ -3779,7 +3777,6 @@ LRESULT CMenuStyleDlg::OnDestroy( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
{
if (m_hIcon) DestroyIcon(m_hIcon);
m_hIcon=NULL;
if (m_bLargeBitmaps)
{
HBITMAP bmp=(HBITMAP)m_ImageClassic1.SendMessage(STM_GETIMAGE,IMAGE_BITMAP);
if (bmp) DeleteObject(bmp);

View File

@@ -369,19 +369,20 @@ IDI_START10 ICON "start10.ico"
IDB_ARROWS BITMAP "menu_arrows.bmp"
IDB_ARROWS150 BITMAP "menu_arrows150.bmp"
IDB_SEARCH_ICONS BITMAP "search_icons.bmp"
IDB_STYLE_CLASSIC1 BITMAP "style_classic.bmp"
IDB_STYLE_CLASSIC2 BITMAP "style_vista.bmp"
IDB_STYLE_WIN7 BITMAP "style_7.bmp"
IDB_BTN_CLASSIC BITMAP "btn_classic.bmp"
IDB_STYLE_CLASSIC1150 BITMAP "style_classic150.bmp"
IDB_STYLE_CLASSIC2150 BITMAP "style_vista150.bmp"
IDB_STYLE_WIN7150 BITMAP "style_7150.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// IMAGE
//
IDB_STYLE_CLASSIC1 IMAGE "style_classic.png"
IDB_STYLE_CLASSIC2 IMAGE "style_vista.png"
IDB_STYLE_WIN7 IMAGE "style_7.png"
IDB_STYLE_CLASSIC1150 IMAGE "style_classic150.png"
IDB_STYLE_CLASSIC2150 IMAGE "style_vista150.png"
IDB_STYLE_WIN7150 IMAGE "style_7150.png"
IDB_BUTTON96 IMAGE "button96.png"
IDB_BUTTON120 IMAGE "button120.png"
IDB_BUTTON144 IMAGE "button144.png"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB