Ignore:
Timestamp:
Jan 18, 2000, 11:27:56 PM (26 years ago)
Author:
sandervl
Message:

Display Odin logo in Shell about dialog box

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/shell32_main.cpp

    r2393 r2477  
    1 /* $Id: shell32_main.cpp,v 1.7 2000-01-09 19:23:09 phaller Exp $ */
     1/* $Id: shell32_main.cpp,v 1.8 2000-01-18 22:27:56 sandervl Exp $ */
    22
    33/*
     
    559559 * AboutDlgProc32                           (internal)
    560560 */
     561#define IDC_ODINLOGO 2001
     562#define IDB_ODINLOGO 5555
     563
    561564BOOL WINAPI AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
    562565                              LPARAM lParam )
    563 {   HWND hWndCtl;
     566{
     567    HWND hWndCtl;
    564568    char Template[512], AppTitle[512];
    565569
    566     TRACE_(shell)("\n");
    567 
    568570    switch(msg)
    569     { case WM_INITDIALOG:
    570       { ABOUT_INFO *info = (ABOUT_INFO *)lParam;
    571             if (info)
    572         { const char* const *pstr = SHELL_People;
    573                 SendDlgItemMessageA(hWnd, stc1, STM_SETICON,info->hIcon, 0);
    574                 GetWindowTextA( hWnd, Template, sizeof(Template) );
    575                 sprintf( AppTitle, Template, info->szApp );
    576                 SetWindowTextA( hWnd, AppTitle );
    577                 SetWindowTextA( GetDlgItem(hWnd, IDC_STATIC_TEXT),
    578                                   info->szOtherStuff );
    579                 hWndCtl = GetDlgItem(hWnd, IDC_LISTBOX);
    580                 SendMessageA( hWndCtl, WM_SETREDRAW, 0, 0 );
    581                 while (*pstr)
    582           { SendMessageA( hWndCtl, LB_ADDSTRING, (WPARAM)-1, (LPARAM)*pstr );
    583                     pstr++;
    584                 }
    585                 SendMessageA( hWndCtl, WM_SETREDRAW, 1, 0 );
     571    {
     572    case WM_INITDIALOG:
     573    {
     574        ABOUT_INFO *info = (ABOUT_INFO *)lParam;
     575        if(info)
     576        {
     577          const char* const *pstr = SHELL_People;
     578
     579            SendDlgItemMessageA(hWnd, stc1, STM_SETICON,info->hIcon, 0);
     580            GetWindowTextA( hWnd, Template, sizeof(Template) );
     581            sprintf( AppTitle, Template, info->szApp );
     582            SetWindowTextA( hWnd, AppTitle );
     583            SetWindowTextA( GetDlgItem(hWnd, IDC_STATIC_TEXT), info->szOtherStuff );
     584
     585            HWND hwndOdinLogo = GetDlgItem(hWnd, IDC_ODINLOGO);
     586            if(hwndOdinLogo) {
     587                        HBITMAP hBitmap = LoadBitmapA(shell32_hInstance, MAKEINTRESOURCEA(IDB_ODINLOGO));
     588                        SendMessageA(hwndOdinLogo, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hBitmap);
    586589            }
     590
     591            hWndCtl = GetDlgItem(hWnd, IDC_LISTBOX);
     592            SendMessageA( hWndCtl, WM_SETREDRAW, 0, 0 );
     593            while (*pstr)
     594            {
     595                SendMessageA( hWndCtl, LB_ADDSTRING, (WPARAM)-1, (LPARAM)*pstr );
     596                pstr++;
     597            }
     598            SendMessageA( hWndCtl, WM_SETREDRAW, 1, 0 );
    587599        }
    588600        return 1;
     601    }
    589602
    590603    case WM_PAINT:
    591       { RECT rect;
    592        PAINTSTRUCT ps;
    593        HDC hDC = BeginPaint( hWnd, &ps );
    594 
    595        if( __get_dropline( hWnd, &rect ) ) {
    596            SelectObject( hDC, GetStockObject( BLACK_PEN ) );
    597            MoveToEx( hDC, rect.left, rect.top, NULL );
    598       LineTo( hDC, rect.right, rect.bottom );
    599        }
    600        EndPaint( hWnd, &ps );
    601    }
    602    break;
     604    {
     605        RECT rect;
     606        PAINTSTRUCT ps;
     607        HDC hDC = BeginPaint( hWnd, &ps );
     608
     609        if( __get_dropline( hWnd, &rect ) ) {
     610            SelectObject( hDC, GetStockObject( BLACK_PEN ) );
     611            MoveToEx( hDC, rect.left, rect.top, NULL );
     612            LineTo( hDC, rect.right, rect.bottom );
     613        }
     614        EndPaint( hWnd, &ps );
     615        break;
     616   }
    603617
    604618#if 0
     
    682696    case WM_COMMAND:
    683697        if (wParam == IDOK)
    684     {  EndDialog(hWnd, TRUE);
     698        {
     699            EndDialog(hWnd, TRUE);
    685700            return TRUE;
    686701        }
    687702        break;
     703
    688704    case WM_CLOSE:
    689       EndDialog(hWnd, TRUE);
    690       break;
     705        EndDialog(hWnd, TRUE);
     706        break;
    691707    }
    692708    return 0;
Note: See TracChangeset for help on using the changeset viewer.