From: Stanislav Motylkov Date: Sat, 23 Mar 2019 17:53:01 +0000 (+0300) Subject: [SHELL32] Add line bar to About dialog for consistence X-Git-Tag: 0.4.13-dev~154 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=cc99d3ad5ffe06d351024e207d5f0b39ec9ef30d [SHELL32] Add line bar to About dialog for consistence Addendum to f9d2931. CORE-15215 --- diff --git a/dll/win32/shell32/bitmap_res.rc b/dll/win32/shell32/bitmap_res.rc index f267eb74b1a..80dfa6f0edc 100644 --- a/dll/win32/shell32/bitmap_res.rc +++ b/dll/win32/shell32/bitmap_res.rc @@ -1,4 +1,5 @@ IDB_REACTOS BITMAP "res/bitmaps/reactos.bmp" +IDB_LINEBAR BITMAP "res/bitmaps/line.bmp" IDB_SHELL_IEXPLORE_LG BITMAP "res/bitmaps/204.bmp" IDB_SHELL_IEXPLORE_LG_HOT BITMAP "res/bitmaps/205.bmp" diff --git a/dll/win32/shell32/res/bitmaps/line.bmp b/dll/win32/shell32/res/bitmaps/line.bmp new file mode 100644 index 00000000000..08717d3cbe7 Binary files /dev/null and b/dll/win32/shell32/res/bitmaps/line.bmp differ diff --git a/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h index 0a8cb724ac0..9f7d6747cfb 100644 --- a/dll/win32/shell32/shresdef.h +++ b/dll/win32/shell32/shresdef.h @@ -27,6 +27,7 @@ /* Bitmaps */ #define IDB_REACTOS 131 +#define IDB_LINEBAR 138 #define IDB_SHELL_IEXPLORE_LG 204 #define IDB_SHELL_IEXPLORE_LG_HOT 205 #define IDB_SHELL_IEXPLORE_SM 206 diff --git a/dll/win32/shell32/wine/shell32_main.c b/dll/win32/shell32/wine/shell32_main.c index 5b9ca5eae83..4ae3ea0d50b 100644 --- a/dll/win32/shell32/wine/shell32_main.c +++ b/dll/win32/shell32/wine/shell32_main.c @@ -1132,8 +1132,8 @@ INT_PTR CALLBACK AboutAuthorsDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) { static DWORD cxLogoBmp; - static DWORD cyLogoBmp; - static HBITMAP hLogoBmp; + static DWORD cyLogoBmp, cyLineBmp; + static HBITMAP hLogoBmp, hLineBmp; static HWND hWndAuthors; switch(msg) @@ -1153,8 +1153,9 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM // Preload the ROS bitmap hLogoBmp = (HBITMAP)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IDB_REACTOS), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); + hLineBmp = (HBITMAP)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IDB_LINEBAR), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); - if(hLogoBmp) + if(hLogoBmp && hLineBmp) { BITMAP bmpLogo; @@ -1162,6 +1163,9 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM cxLogoBmp = bmpLogo.bmWidth; cyLogoBmp = bmpLogo.bmHeight; + + GetObject( hLineBmp, sizeof(BITMAP), &bmpLogo ); + cyLineBmp = bmpLogo.bmHeight; } // Set App-specific stuff (icon, app name, szOtherStuff string) @@ -1258,20 +1262,25 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM case WM_PAINT: { - if(hLogoBmp) + if(hLogoBmp && hLineBmp) { PAINTSTRUCT ps; HDC hdc; HDC hdcMem; + HGDIOBJ hOldObj; hdc = BeginPaint(hWnd, &ps); hdcMem = CreateCompatibleDC(hdc); if(hdcMem) { - SelectObject(hdcMem, hLogoBmp); + hOldObj = SelectObject(hdcMem, hLogoBmp); BitBlt(hdc, 0, 0, cxLogoBmp, cyLogoBmp, hdcMem, 0, 0, SRCCOPY); + SelectObject(hdcMem, hLineBmp); + BitBlt(hdc, 0, cyLogoBmp, cxLogoBmp, cyLineBmp, hdcMem, 0, 0, SRCCOPY); + + SelectObject(hdcMem, hOldObj); DeleteDC(hdcMem); }